diff options
author | Tony Cook <tony@develop-help.com> | 2020-09-14 15:51:05 +1000 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2021-01-06 17:40:04 +0000 |
commit | 7925f8dfc09ddebcbfa214fdcd854c52090586f9 (patch) | |
tree | f89da34b1341b50f324dbe210174c894165ba901 | |
parent | d2f68b387a1247703a3be515c67907131c97b6b5 (diff) | |
download | perl-7925f8dfc09ddebcbfa214fdcd854c52090586f9.tar.gz |
run_multiple_progs: allow the EXPECT to contain only OPTIONS
(cherry picked from commit a2f2a4e3143a7f85d874450cced74b7399fd6977)
-rw-r--r-- | t/test.pl | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1101,6 +1101,7 @@ sub fresh_perl_like { # regex - the expected output is a regular expression # random - all lines match but in any order # fatal - the code will fail fatally (croak, die) +# nonfatal - the code is not expected to fail fatally # # If the actual output contains a line "SKIPPED" the test will be # skipped. @@ -1305,7 +1306,7 @@ sub run_multiple_progs { my $option_regex = 0; my $option_random = 0; my $fatal = $FATAL; - if ($expected =~ s/^OPTIONS? (.+)\n//) { + if ($expected =~ s/^OPTIONS? (.+)(?:\n|\Z)//) { foreach my $option (split(' ', $1)) { if ($option eq 'regex') { # allow regular expressions $option_regex = 1; |