diff options
author | Adrian M. Enache <enache@rdslink.ro> | 2003-03-05 14:06:20 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-03-06 20:45:08 +0000 |
commit | 842517601b969821600597cc5736114bee3b0c27 (patch) | |
tree | 16a252ad5301ef7cd4422bca12280c0387913c5c /t | |
parent | e69880a56d80785fbe5600b4e7dabf583188c526 (diff) | |
download | perl-842517601b969821600597cc5736114bee3b0c27.tar.gz |
cleaning up tests of the 'eval { decl. } <=> runtime decl.' assumption
Message-ID: <20030305100620.GA909@ratsnest.hole>
p4raw-id: //depot/perl@18840
Diffstat (limited to 't')
-rwxr-xr-x | t/op/method.t | 2 | ||||
-rwxr-xr-x | t/op/sub_lval.t | 5 | ||||
-rwxr-xr-x | t/op/ver.t | 4 | ||||
-rw-r--r-- | t/run/fresh_perl.t | 2 |
4 files changed, 5 insertions, 8 deletions
diff --git a/t/op/method.t b/t/op/method.t index 52fb705fb8..ae8031a9f6 100755 --- a/t/op/method.t +++ b/t/op/method.t @@ -231,7 +231,7 @@ is( Foo->boogie(), "yes, sir!"); # This is actually testing parsing of indirect objects and undefined subs # print foo("bar") where foo does not exist is not an indirect object. # print foo "bar" where foo does not exist is an indirect object. -eval { sub AUTOLOAD { "ok ", shift, "\n"; } }; +eval 'sub AUTOLOAD { "ok ", shift, "\n"; }'; ok(1); # Bug ID 20010902.002 diff --git a/t/op/sub_lval.t b/t/op/sub_lval.t index a17c3c62c5..003c1a0a50 100755 --- a/t/op/sub_lval.t +++ b/t/op/sub_lval.t @@ -423,10 +423,7 @@ $a->() = 8; print "# '$nnewvar'.\nnot " unless $nnewvar eq '8'; print "ok 46\n"; -# This must happen at run time -eval { - sub AUTOLOAD : lvalue { $newvar }; -}; +eval 'sub AUTOLOAD : lvalue { $newvar }'; foobar() = 12; print "# '$newvar'.\nnot " unless $newvar eq "12"; print "ok 47\n"; diff --git a/t/op/ver.t b/t/op/ver.t index 5cf97a8b9b..acf6af7f35 100755 --- a/t/op/ver.t +++ b/t/op/ver.t @@ -13,7 +13,7 @@ use Config; require "test.pl"; plan( tests => 50 ); -eval { use v5.5.640; }; +eval 'use v5.5.640'; is( $@, '', "use v5.5.640; $@"); require_ok('v5.5.640'); @@ -52,7 +52,7 @@ is(v1.20.300.4000, "\x{1}\x{14}\x{12c}\x{fa0}",'compare embedded \x{} string'); # # now do the same without the "v" -eval { use 5.5.640; }; +eval 'use 5.5.640'; is( $@, '', "use 5.5.640; $@"); require_ok('5.5.640'); diff --git a/t/run/fresh_perl.t b/t/run/fresh_perl.t index 2f8baa6df4..a0f707ff05 100644 --- a/t/run/fresh_perl.t +++ b/t/run/fresh_perl.t @@ -89,7 +89,7 @@ $x=2;$y=3;$x<$y ? $x : $y += 23;print $x; EXPECT 25 ######## -eval {sub bar {print "In bar";}} +eval 'sub bar {print "In bar"}'; ######## system './perl -ne "print if eof" /dev/null' unless $^O eq 'MacOS' ######## |