From fad3d20752edd48e1cb48c667e7f3e2e74a11517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sun, 27 Sep 2015 17:10:25 +0200 Subject: Replace sed -i with perl -ni in tests This fixes an issue on OSX where the OSX make 3.81 has a bug with multilines single quoted arguments to commands: it strips the backslash and newlines entirely. This makes it impossible to use sed -i properly. Since this is the test suite, we can instead use perl -ni, which can do the same and is available and work fine on all tested platforms. --- test/core_plugins.mk | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'test/core_plugins.mk') diff --git a/test/core_plugins.mk b/test/core_plugins.mk index 5bbee3f..dfece5e 100644 --- a/test/core_plugins.mk +++ b/test/core_plugins.mk @@ -37,11 +37,7 @@ core-plugins-all: build clean-core-plugins-all git commit -q -m "Tests" $i "Add dependency and plugins to the Makefile" - $t sed -i.bak '2i\ -DEPS = plugin_dep\ -dep_plugin_dep = git file://$(abspath $(APP)/plugin_dep) master\ -DEP_PLUGINS = plugin_dep\ -' $(APP)/Makefile + $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = plugin_dep\ndep_plugin_dep = git file://$(abspath $(APP)/plugin_dep) master\nDEP_PLUGINS = plugin_dep\n"}' $(APP)/Makefile $i "Run 'make plugin1' and check that it prints plugin1" $t test -n "`$(MAKE) -C $(APP) plugin1 | grep plugin1`" @@ -73,11 +69,7 @@ core-plugins-one: build clean-core-plugins-one git commit -q -m "Tests" $i "Add dependency and plugins to the Makefile" - $t sed -i.bak '2i\ -DEPS = plugin_dep\ -dep_plugin_dep = git file://$(abspath $(APP)/plugin_dep) master\ -DEP_PLUGINS = plugin_dep/mk/plugin1.mk\ -' $(APP)/Makefile + $t perl -ni.bak -e 'print;if ($$.==1) {print "DEPS = plugin_dep\ndep_plugin_dep = git file://$(abspath $(APP)/plugin_dep) master\nDEP_PLUGINS = plugin_dep/mk/plugin1.mk\n"}' $(APP)/Makefile $i "Run 'make plugin1' and check that it prints plugin1" $t test -n "`$(MAKE) -C $(APP) plugin1 | grep plugin1`" -- cgit v1.2.3