Skip to content

Commit c736702

Browse files
committed
split.t vs. VMS: be more forgiving about newlines
Debug output is the same on VMS as everywhere else, but when written through a pipe (such as fresh_perl does) each write causes another newline. The path of least resistance is to just allow those newlines when testing output as the other content is unchanged.
1 parent b52ac08 commit c736702

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t/op/split.t

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ SKIP: {
719719
) {
720720
my($pattern, $flag) = @$_;
721721
my $prog = "split $pattern";
722-
my $expect = qr{^r->extflags:.*\b$flag\b}m;
722+
my $expect = qr{^r->extflags:.*\b$flag\b}ms;
723723
fresh_perl_like($prog, $expect, {
724724
switches => [ '-Mre=Debug,COMPILE', '-c' ],
725725
}, "special-case pattern for $prog");
@@ -741,7 +741,7 @@ SKIP: {
741741

742742
for my $prog ( @skipwhite ) {
743743
fresh_perl_like("use re qw(/$modifiers); \$sp=qq( ); \$e=qq(); $prog;",
744-
qr{^r->extflags:.*\bSKIPWHITE\b\s\bWHITE\b}m,
744+
qr{^r->extflags:.*\bSKIPWHITE\b\s\n?\bWHITE\b}ms,
745745
{switches => [ '-Mre=Debug,COMPILE' ]},
746746
"$prog sets SKIPWHITE|WHITE under `use re qw(/$modifiers)`");
747747

@@ -753,12 +753,12 @@ SKIP: {
753753
}
754754
for my $prog ( @noskipwhite) {
755755
fresh_perl_like("use re qw(/$modifiers); \$sp=qq( ); \$e=qq(); $prog;",
756-
qr{^r->extflags:.*\bNULL\b}m,
756+
qr{^r->extflags:.*\bNULL\b}ms,
757757
{switches => [ '-Mre=Debug,COMPILE' ]},
758758
"$prog does not set SKIPWHITE|WHITE under `use re qw(/$modifiers)`");
759759
fresh_perl_like("use re qw(/$modifiers); \$sp=qq( ); \$e=qq();"
760760
."\$_=qq( 1 1 ); \@c=$prog; print 0+\@c, qq(<\@c>)",
761-
qr{^6< 1 1 >}m,
761+
qr{^6< 1 1 >}ms,
762762
{},
763763
"$prog matches expected under `use re qw(/$modifiers)`");
764764
}

0 commit comments

Comments
 (0)