This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make switchDx.t more forgiving about newlines.
authorCraig A. Berry <craigberry@mac.com>
Thu, 28 Jul 2016 19:08:15 +0000 (14:08 -0500)
committerCraig A. Berry <craigberry@mac.com>
Thu, 28 Jul 2016 19:08:15 +0000 (14:08 -0500)
On VMS, the test suite collapses multiple newlines into one in
order to work around a bug in the pipe implementation, so the
test needs to allow for that.

t/run/switchDx.t

index acb2995..43f31bf 100644 (file)
@@ -26,7 +26,7 @@ END {
                   { stderr => 1 },
                   "No perlio debug file without -Di...");
     ok(!-e $perlio_log, "...no perlio.txt found");
-    fresh_perl_is("print qq(hello\n)", "\nEXECUTING...\n\nhello\n",
+    fresh_perl_like("print qq(hello\n)", qr/\nEXECUTING...\n{1,2}hello\n?/,
                   { stderr => 1, switches => [ "-Di" ] },
                   "Perlio debug file with both -Di and PERLIO_DEBUG...");
     ok(-e $perlio_log, "... perlio debugging file found with -Di and PERLIO_DEBUG");