New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swapped warnings for -o and -O file tests #8042
Comments
From pfusik@op.plThis is a bug report for perl from pfusik@op.pl, $ perl -we '-o' $ perl -we '-O' I have no idea if anything other than warnings can be affected by this bug. Flags: Site configuration information for perl v5.8.7: Configured by ActiveState at Sat Jun 4 07:30:27 PDT 2005. Summary of my perl5 (revision 5 version 8 subversion 7) configuration: config_args='-ders -Dcc=gcc -Dusethreads -Duseithreads -Ud_sigsetjmp -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -Accflags=-DUSE_S cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DUSE_SITECUSTOMIZE -DNO_HASH_SEED -DBUILT_BY_ACTIVESTATE -fno-strict-alias Locally applied patches: @INC for perl v5.8.7: Environment for perl v5.8.7: |
From pfusik@op.plofiletest.patchdiff -ruN perl-current/opcode.h perl-patched/opcode.h
--- perl-current/opcode.h 2005-05-11 08:24:00.000000000 +0200
+++ perl-patched/opcode.h 2005-07-27 22:46:36.000000000 +0200
@@ -635,8 +635,8 @@
"-w",
"-x",
"-e",
- "-O",
"-o",
+ "-O",
"-z",
"-s",
"-M",
diff -ruN perl-current/opcode.pl perl-patched/opcode.pl
--- perl-current/opcode.pl 2005-05-11 08:24:00.000000000 +0200
+++ perl-patched/opcode.pl 2005-07-27 22:46:34.000000000 +0200
@@ -809,8 +809,8 @@
ftewrite -w ck_ftst isu- F-
fteexec -x ck_ftst isu- F-
ftis -e ck_ftst isu- F-
-fteowned -O ck_ftst isu- F-
-ftrowned -o ck_ftst isu- F-
+fteowned -o ck_ftst isu- F-
+ftrowned -O ck_ftst isu- F-
ftzero -z ck_ftst isu- F-
ftsize -s ck_ftst istu- F-
ftmtime -M ck_ftst stu- F-
diff -ruN perl-current/t/op/filetest.t perl-patched/t/op/filetest.t
--- perl-current/t/op/filetest.t 2004-03-22 00:00:00.000000000 +0100
+++ perl-patched/t/op/filetest.t 2005-07-27 23:20:19.000000000 +0200
@@ -10,7 +10,7 @@
}
use Config;
-plan(tests => 22);
+plan(tests => 24);
ok( -d 'op' );
ok( -f 'TEST' );
@@ -78,3 +78,23 @@
ok( -x -d -x 'op' );
ok( (-s -f 'TEST' > 1), "-s returns real size" );
ok( -f -s 'TEST' == 1 );
+
+# Test -o and -O in warning messages (they used to be swapped)
+
+{
+ use warnings;
+ my $warn = '';
+ local $SIG{'__WARN__'} = sub { $warn .= join '', @_; };
+ local $_;
+ -o;
+ like($warn, qr/in -o /);
+}
+
+{
+ use warnings;
+ my $warn = '';
+ local $SIG{'__WARN__'} = sub { $warn .= join '', @_; };
+ local $_;
+ -O;
+ like($warn, qr/in -O /);
+}
|
From @rgsPiotr Fusik wrote:
Thanks, applied, as #25232, except the test. It's already tested by |
The RT System itself - Status changed from 'new' to 'open' |
@rgs - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#36672 (status was 'resolved')
Searchable as RT36672$
The text was updated successfully, but these errors were encountered: