From 7925f8dfc09ddebcbfa214fdcd854c52090586f9 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Mon, 14 Sep 2020 15:51:05 +1000 Subject: run_multiple_progs: allow the EXPECT to contain only OPTIONS (cherry picked from commit a2f2a4e3143a7f85d874450cced74b7399fd6977) --- t/test.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/test.pl b/t/test.pl index 60f185854f..8c62393138 100644 --- a/t/test.pl +++ b/t/test.pl @@ -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; -- cgit v1.2.1