require "./test.pl";
-plan(tests => 30);
+plan(tests => 31);
use Config;
);
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
progfile => $filename,
args => [ '-x=foo' ],
);
- is( $r, 'foo', '-s on the shebang line' );
+ is( $r, 'foo', '-sn on the shebang line' );
push @tmpfiles, $filename;
}
my $v = sprintf "%vd", $^V;
like( runperl( switches => ['-v'] ),
- qr/This is perl, v$v built for $Config{archname}.+Copyright.+Larry Wall.+Artistic License.+GNU General Public License/s,
+ qr/This is perl, v$v (?:DEVEL\d+ )?built for \Q$Config{archname}\E.+Copyright.+Larry Wall.+Artistic License.+GNU General Public License/s,
'-v looks okay' );
}