summaryrefslogtreecommitdiff
path: root/tests/run_make_tests.pl
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2004-09-21 04:00:31 +0000
committerPaul Smith <psmith@gnu.org>2004-09-21 04:00:31 +0000
commit0799ce730d2404d1cd1d03ce2f4ac07cc079c72e (patch)
tree6b9602199bec0f905f06a7a8f1c7bedb1e65b349 /tests/run_make_tests.pl
parent08c8105c5468ff743d2f2ff2fdf3b77a6313b53e (diff)
downloadgunmake-0799ce730d2404d1cd1d03ce2f4ac07cc079c72e.tar.gz
Fix some bugs in variable pattern substitution (e.g. $(VAR:A=B)),
reported by Markus Mauhart <qwe123@chello.at>. One was a simple typo; to fix the other we call patsubst_expand() for all instances of variable substitution, even when there is no '%'. We used to call subst_expand() with a special flag set in the latter case, but it didn't work properly in all situations. Easier to just use patsubst_expand() since that's what it is.
Diffstat (limited to 'tests/run_make_tests.pl')
-rwxr-xr-xtests/run_make_tests.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/run_make_tests.pl b/tests/run_make_tests.pl
index 8452c6b..991e780 100755
--- a/tests/run_make_tests.pl
+++ b/tests/run_make_tests.pl
@@ -64,6 +64,14 @@ sub run_make_test
$makefile = &get_tmpfile();
}
+ # If either the makestring or the answer don't end in newlines, add one In
+ # the future should we allow an option to disable this? For now if you
+ # want to test handling with no newline you have to call the underlying
+ # functions directly.
+
+ $makestring =~ /\n$/s or $makestring .= "\n";
+ $answer =~ /\n$/s or $answer .= "\n";
+
# Replace @MAKEFILE@ with the makefile name and @MAKE@ with the path to
# make in both $makestring and $answer.