summaryrefslogtreecommitdiff
path: root/tests/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts')
-rw-r--r--tests/scripts/functions/eval2
-rw-r--r--tests/scripts/misc/close_stdout2
-rw-r--r--tests/scripts/variables/special63
3 files changed, 65 insertions, 2 deletions
diff --git a/tests/scripts/functions/eval b/tests/scripts/functions/eval
index 6f02a7a..90513bd 100644
--- a/tests/scripts/functions/eval
+++ b/tests/scripts/functions/eval
@@ -163,7 +163,7 @@ world');
# See Savannah bug # 12124.
run_make_test('deps: ; $(eval deps: foo)', '',
- '#MAKEFILE#:1: *** prerequisites cannot be defined in command scripts. Stop.',
+ '#MAKEFILE#:1: *** prerequisites cannot be defined in recipes. Stop.',
512);
1;
diff --git a/tests/scripts/misc/close_stdout b/tests/scripts/misc/close_stdout
index 688942e..18606c3 100644
--- a/tests/scripts/misc/close_stdout
+++ b/tests/scripts/misc/close_stdout
@@ -3,7 +3,7 @@
$description = "Make sure make exits with an error if stdout is full.";
if (-e '/dev/full') {
- run_make_test('', '-v > /dev/full', '#MAKE#: write error', 256);
+ run_make_test('', '-v > /dev/full', '/^#MAKE#: write error/', 256);
}
1;
diff --git a/tests/scripts/variables/special b/tests/scripts/variables/special
index 77b355c..a1e15c2 100644
--- a/tests/scripts/variables/special
+++ b/tests/scripts/variables/special
@@ -50,5 +50,68 @@ all:
# $answer = "X1 =\nX2 = all\nLAST = all foo\n";
# &compare_output($answer, &get_logfile(1));
+# Test the .RECIPEPREFIX variable
+&run_make_test('
+define foo
+: foo-one \
+foo-two
+: foo-three
+ : foo-four
+endef
+
+orig: ; : orig-one
+ : orig-two \
+orig-three \
+ orig-four \
+ orig-five \\\\
+ : orig-six
+ $(foo)
+
+.RECIPEPREFIX = >
+test: ; : test-one
+>: test-two \
+test-three \
+>test-four \
+> test-five \\\\
+>: test-six
+>$(foo)
+
+.RECIPEPREFIX =
+reset: ; : reset-one
+ : reset-two \
+reset-three \
+ reset-four \
+ reset-five \\\\
+ : reset-six
+ $(foo)
+',
+ 'orig test reset',
+ ': orig-one
+: orig-two \
+orig-three \
+orig-four \
+ orig-five \\\\
+: orig-six
+: foo-one foo-two
+: foo-three
+: foo-four
+: test-one
+: test-two \
+test-three \
+test-four \
+ test-five \\\\
+: test-six
+: foo-one foo-two
+: foo-three
+: foo-four
+: reset-one
+: reset-two \
+reset-three \
+reset-four \
+ reset-five \\\\
+: reset-six
+: foo-one foo-two
+: foo-three
+: foo-four');
1;