diff options
author | Michael G. Schwern <schwern@pobox.com> | 2005-07-22 05:53:34 -0700 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-07-28 17:18:13 +0000 |
commit | ccecb81f3fa058820141d0cb9cd4ce1f15b71a8d (patch) | |
tree | a9b0eee4dd36ddc0ee0af8a2416d6627dfa93867 | |
parent | 63ce7bf0495e344518a30158c925e43ffea6cc33 (diff) | |
download | perl-ccecb81f3fa058820141d0cb9cd4ce1f15b71a8d.tar.gz |
Being more careful about newlines
Message-ID: <20050722195334.GA12431@windhund.schwern.org>
p4raw-id: //depot/perl@25239
-rw-r--r-- | t/run/fresh_perl.t | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/t/run/fresh_perl.t b/t/run/fresh_perl.t index 980f5e53be..d422bee3c8 100644 --- a/t/run/fresh_perl.t +++ b/t/run/fresh_perl.t @@ -35,11 +35,13 @@ foreach my $prog (@prgs) { my($raw_prog, $name) = @$prog; my $switch; - if ($raw_prog =~ s/^\s*(-\w.*)//){ + if ($raw_prog =~ s/^\s*(-\w.*)\n//){ $switch = $1; } my($prog,$expected) = split(/\nEXPECT\n/, $raw_prog); + $prog .= "\n"; + $expected = '' unless defined $expected; if ($prog =~ /^\# SKIP: (.+)/m) { if (eval $1) { @@ -50,7 +52,7 @@ foreach my $prog (@prgs) { $expected =~ s/\n+$//; - fresh_perl_is($prog, $expected, { switches => [$switch] }, $name); + fresh_perl_is($prog, $expected, { switches => [$switch || ''] }, $name); } __END__ @@ -383,7 +385,7 @@ EXPECT -w sub testme { my $a = "test"; { local $a = "new test"; print $a }} EXPECT -Can't localize lexical variable $a at - line 2. +Can't localize lexical variable $a at - line 1. ######## package X; sub ascalar { my $r; bless \$r } @@ -510,7 +512,7 @@ else { if ($x == 0) { print "" } else { print $x } } EXPECT -Use of uninitialized value $x in numeric eq (==) at - line 4. +Use of uninitialized value $x in numeric eq (==) at - line 3. ######## $x = sub {}; foo(); @@ -651,8 +653,9 @@ new_pmop "abcdef"; reset; close STDERR; die; EXPECT ######## +# core dump in 20000716.007 -w -"x" =~ /(\G?x)?/; # core dump in 20000716.007 +"x" =~ /(\G?x)?/; ######## # Bug 20010515.004 my @h = 1 .. 10; |