Change 29865 by [EMAIL PROTECTED] on 2007/01/17 23:48:41

        Integrate:
        [ 26670]
        Make '-s' on the shebang line able to parse -foo=bar switches again.
        This feature was broken by change 19695 some years ago
        and integrated into perl-5.8.1.  perl-5.8.0 was fine.
        Ref http://bugs.activestate.com/show_bug.cgi?id=43483

Affected files ...

... //depot/maint-5.8/perl/perl.c#184 integrate
... //depot/maint-5.8/perl/t/run/switches.t#7 integrate

Differences ...

==== //depot/maint-5.8/perl/t/run/switches.t#7 (text) ====
Index: perl/t/run/switches.t
--- perl/t/run/switches.t#6~29864~      2007-01-17 15:29:13.000000000 -0800
+++ perl/t/run/switches.t       2007-01-17 15:48:41.000000000 -0800
@@ -11,7 +11,7 @@
 
 require "./test.pl";
 
-plan(tests => 26);
+plan(tests => 27);
 
 use Config;
 
@@ -125,11 +125,27 @@
 );
 is( $r, '21-', '-s switch parsing' );
 
-# Bug ID 20011106.084
 $filename = 'swstest.tmp';
 SKIP: {
     open my $f, ">$filename" or skip( "Can't write temp file $filename: $!" );
     print $f <<'SWTEST';
+#!perl -s
+BEGIN { print $x,$y; exit }
+SWTEST
+    close $f or die "Could not close: $!";
+    $r = runperl(
+       progfile    => $filename,
+       args        => [ '-x=foo -y' ],
+    );
+    is( $r, 'foo1', '-s on the shebang line' );
+    push @tmpfiles, $filename;
+}
+
+# Bug ID 20011106.084
+$filename = 'swsntest.tmp';
+SKIP: {
+    open my $f, ">$filename" or skip( "Can't write temp file $filename: $!" );
+    print $f <<'SWTEST';
 #!perl -sn
 BEGIN { print $x; exit }
 SWTEST
@@ -138,7 +154,7 @@
        progfile    => $filename,
        args        => [ '-x=foo' ],
     );
-    is( $r, 'foo', '-s on the shebang line' );
+    is( $r, 'foo', '-sn on the shebang line' );
     push @tmpfiles, $filename;
 }
 
End of Patch.

Reply via email to