summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2011-09-02 05:37:54 +0000
committerPaul Smith <psmith@gnu.org>2011-09-02 05:37:54 +0000
commit9a9f83e8b52a3923efc6b4cf8c8f444773a30953 (patch)
tree15457f8b817a5c16af8b6fe5772e4588d5d01771 /tests
parente4d5d434247b720a3f78e1f7279168b5e6bf628e (diff)
downloadgunmake-9a9f83e8b52a3923efc6b4cf8c8f444773a30953.tar.gz
Ensure that -n takes precedence over -t.
Patch from Michael Witten <mfwitten@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog5
-rw-r--r--tests/scripts/options/dash-n17
2 files changed, 21 insertions, 1 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 32213bb..03983ec 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-02 Paul Smith <psmith@gnu.org>
+
+ * scripts/options/dash-n: Verify that in "-n -t", the -n takes
+ priority. Patch from Michael Witten <mfwitten@gmail.com>.
+
2011-08-29 Paul Smith <psmith@gnu.org>
* scripts/features/varnesting: Test resetting of variables while
diff --git a/tests/scripts/options/dash-n b/tests/scripts/options/dash-n
index de19f42..248e0c8 100644
--- a/tests/scripts/options/dash-n
+++ b/tests/scripts/options/dash-n
@@ -65,6 +65,21 @@ $answer = "$make_name: `a' is up to date.\n";
$answer = "$make_name: `a' is up to date.\n";
&compare_output($answer, &get_logfile(1));
-unlink('a', 'b', 'c');
+# TEST 4
+
+unlink(qw(a b));
+
+&run_make_with_options($makefile2, "-t -n", &get_logfile);
+
+open(DASH_N_LOG, ">>" . &get_logfile(1));
+print DASH_N_LOG "a exists but should not!\n" if -e 'a';
+print DASH_N_LOG "b exists but should not!\n" if -e 'b';
+close(DASH_N_LOG);
+
+&compare_output("touch b\ntouch a\n", &get_logfile(1));
+
+# CLEANUP
+
+unlink(qw(a b c));
1;