From e330f831eecc4294569cd42d2ab84d37326af04e Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 24 Oct 2012 10:28:55 -0600 Subject: [PATCH] test.pl: Allow NAME to be used with --FILE-- Prior to this patch the --FILE-- feature of test.pl could not be used on tests that had a name. This is because --FILE-- is expecting a \n before it, and NAME strips that off. This commit just makes the \n optional. --- t/test.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/test.pl b/t/test.pl index bf9269b..7d06d39 100644 --- a/t/test.pl +++ b/t/test.pl @@ -1014,7 +1014,7 @@ sub run_multiple_progs { } if ($prog =~ /--FILE--/) { - my @files = split(/\n--FILE--\s*([^\s\n]*)\s*\n/, $prog) ; + my @files = split(/\n?--FILE--\s*([^\s\n]*)\s*\n/, $prog) ; shift @files ; die "Internal error: test $_ didn't split into pairs, got " . scalar(@files) . "[" . join("%%%%", @files) ."]\n" -- 2.7.4