summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog3
-rw-r--r--tests/scripts/misc/general332
2 files changed, 18 insertions, 17 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index be5169b..fa6420d 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,8 @@
2005-06-25 Paul D. Smith <psmith@gnu.org>
+ * scripts/misc/general3: Test semicolons in variable references.
+ Tests fix for Savannah bug #1454.
+
* scripts/variables/MAKE_RESTARTS: New file: test the
MAKE_RESTARTS variable.
* scripts/options/dash-B: Test re-exec doesn't loop infinitely.
diff --git a/tests/scripts/misc/general3 b/tests/scripts/misc/general3
index 2421ed4..40b7ed9 100644
--- a/tests/scripts/misc/general3
+++ b/tests/scripts/misc/general3
@@ -5,13 +5,7 @@ This tests random features of the parser that need to be supported, and
which have either broken at some point in the past or seem likely to
break.";
-$makefile2 = &get_tmpfile;
-
-open(MAKEFILE,"> $makefile");
-
-# The contents of the Makefile ...
-
-print MAKEFILE <<EOF;
+run_make_test("
# We want to allow both empty commands _and_ commands that resolve to empty.
EMPTY =
@@ -31,20 +25,15 @@ TAB = \t \# A TAB and some spaces
\$(STR)
-\$(STR) \$(TAB)
-
-EOF
-
-close(MAKEFILE);
-
-&run_make_with_options($makefile,"",&get_logfile);
-$answer = "$make_name: Nothing to be done for `all'.\n";
-&compare_output($answer,&get_logfile(1));
-
+\$(STR) \$(TAB)",
+ '', "#MAKE#: Nothing to be done for `all'.");
# TEST 2
# Make sure files without trailing newlines are handled properly.
+# Have to use the old style invocation to test this.
+
+$makefile2 = &get_tmpfile;
open(MAKEFILE, "> $makefile2");
print MAKEFILE "all:;\@echo FOO = \$(FOO)\nFOO = foo";
@@ -54,5 +43,14 @@ close(MAKEFILE);
$answer = "FOO = foo\n";
&compare_output($answer,&get_logfile(1));
+# TEST 3
+
+# Check semicolons in variable references
+
+run_make_test('
+$(if true,$(info true; true))
+all: ; @:
+',
+ '', 'true; true');
1;