summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-09-24 11:46:41 +0100
committerNicholas Clark <nick@ccl4.org>2010-09-24 11:48:51 +0100
commit3d7a9343ce805daaa050171aecb0ab4f37fed18d (patch)
tree2c1d85cf2322479ecbeae64339ef052603ba25a7 /t/op
parentbf70f4101a9bd4064c4bc7f03a677f4227ad79a4 (diff)
downloadperl-3d7a9343ce805daaa050171aecb0ab4f37fed18d.tar.gz
Add a warning to test.pl if quotes are used in one-liners.
Fix all the tests that were using quotes, and (by implication) working because barewords are treated as strings, and one-liners aren't run under strict.
Diffstat (limited to 't/op')
-rw-r--r--t/op/array.t2
-rw-r--r--t/op/gv.t2
-rw-r--r--t/op/ref.t4
3 files changed, 4 insertions, 4 deletions
diff --git a/t/op/array.t b/t/op/array.t
index e36fd287ed..f100e2d2df 100644
--- a/t/op/array.t
+++ b/t/op/array.t
@@ -276,7 +276,7 @@ tary();
my $got = runperl (
prog => q{
sub X::DESTROY { @a = () }
- @a = (bless {}, 'X');
+ @a = (bless {}, q{X});
@a = ();
},
stderr => 1
diff --git a/t/op/gv.t b/t/op/gv.t
index cc8f205a85..3044bd857d 100644
--- a/t/op/gv.t
+++ b/t/op/gv.t
@@ -286,7 +286,7 @@ $| = 1;
sub DESTROY {eval {die qq{Farewell $_[0]}}; print $@}
package main;
-bless \$A::B, 'M';
+bless \$A::B, q{M};
*A:: = \*B::;
EOPROG
like($output, qr/^Farewell M=SCALAR/, "DESTROY was called");
diff --git a/t/op/ref.t b/t/op/ref.t
index bad0168872..52a4d2a011 100644
--- a/t/op/ref.t
+++ b/t/op/ref.t
@@ -432,7 +432,7 @@ is ($?, 0, 'coredump on typeglob = (SvRV && !SvROK)');
# "Attempt to free unreferenced scalar" warnings
is (runperl(
- prog => 'use Symbol;my $x=bless \gensym,"t"; print;*$$x=$x',
+ prog => 'use Symbol;my $x=bless \gensym,q{t}; print;*$$x=$x',
stderr => 1
), '', 'freeing self-referential typeglob');
@@ -443,7 +443,7 @@ is (runperl(
TODO: {
local $TODO = "works but output through pipe is mangled" if $^O eq 'VMS';
like (runperl(
- prog => '$x=bless[]; sub IO::Handle::DESTROY{$_="bad";s/bad/ok/;print}',
+ prog => '$x=bless[]; sub IO::Handle::DESTROY{$_=q{bad};s/bad/ok/;print}',
stderr => 1
), qr/^(ok)+$/, 'STDOUT destructor');
}