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.
}
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"