summaryrefslogtreecommitdiff
path: root/tests/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts')
-rw-r--r--tests/scripts/misc/general332
1 files changed, 15 insertions, 17 deletions
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;