X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/f788fe6d36db92946e0ca25d9653b059d0ac6d35..ee09ed4c5400432b740fa28e81457acfd0edfb65:/t/op/write.t?ds=sidebyside diff --git a/t/op/write.t b/t/op/write.t index 59fe268..3dd5023 100755 --- a/t/op/write.t +++ b/t/op/write.t @@ -365,7 +365,8 @@ $v # must fail since we have a trailing ; in the eval'ed string (WL) my @v = ('k'); eval "format OUT14 = \n@\n\@v"; - print $@ ? "ok 14\n" : "not ok 14\n"; + print +($@ && $@ =~ /Format not terminated/) + ? "ok 14\n" : "not ok 14 $@\n"; } @@ -431,7 +432,8 @@ EOD . open(OUT18, '>Op_write.tmp') || die "Can't create Op_write.tmp"; eval { write(OUT18); }; - print $@ ? "ok 18\n" : "not ok 18\n"; + print +($@ && $@ =~ /Repeated format line will never terminate/) + ? "ok 18\n" : "not ok 18: $@\n"; close OUT18 or die "Could not close: $!"; }