summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-09-21 14:24:44 -0400
committerPaul Smith <psmith@gnu.org>2013-09-21 14:24:44 -0400
commit3e4234e3971b19320656d56a8323ee174c84638c (patch)
tree22d2d901aeaf39b23272204c583e59cc67b60b86 /tests
parent39c197db5191dd9e5e3b1a73e56a0bc5d2923e8d (diff)
downloadmake-3e4234e3971b19320656d56a8323ee174c84638c.tar.gz
Don't write "Entering" every time we re-exec for remake makefiles.
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog4
-rw-r--r--tests/scripts/options/dash-w33
2 files changed, 37 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index c6cebbf1..4ee7265b 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,7 @@
+2013-09-21 Paul Smith <psmith@gnu.org>
+
+ * scripts/options/dash-w: Add a test for -w flag.
+
2013-09-15 Paul Smith <psmith@gnu.org>
* scripts/misc/fopen-fail: Check for failure on infinite recursion.
diff --git a/tests/scripts/options/dash-w b/tests/scripts/options/dash-w
new file mode 100644
index 00000000..a05bbee7
--- /dev/null
+++ b/tests/scripts/options/dash-w
@@ -0,0 +1,33 @@
+# -*-perl-*-
+
+$description = "Test the -w option to GNU make.";
+
+# Simple test without -w
+run_make_test(q!
+all: ; @echo hi
+!,
+ "", "hi\n");
+
+# Simple test with -w
+run_make_test(undef, "-w",
+ "#MAKE#: Entering directory '#PWD#'\nhi\n#MAKE#: Leaving directory '#PWD#'\n");
+
+# Test makefile rebuild to ensure no enter/leave
+run_make_test(q!
+include foo
+all: ;@:
+foo: ; touch foo
+!,
+ "", "#MAKEFILE#:2: foo: No such file or directory\ntouch foo\n");
+unlink('foo');
+
+# Test makefile rebuild with -w
+run_make_test(q!
+include foo
+all: ;@:
+foo: ; touch foo
+!,
+ "-w", "#MAKE#: Entering directory '#PWD#'\n#MAKEFILE#:2: foo: No such file or directory\ntouch foo\n#MAKE#: Leaving directory '#PWD#'\n");
+unlink('foo');
+
+1;