diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-05-11 21:44:59 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-05-11 21:44:59 +0000 |
commit | 27130c9a98b24c6442a9f796599b1927247c27ab (patch) | |
tree | 7d06fb4f09cc65d1ed91420c66fadd7a0d5d35ee /t | |
parent | e3159d07eae19a2ad4bc7e5f2e54e307a931528b (diff) | |
parent | e0284a306d2de082f33ef0d8787355c6d4e646d8 (diff) | |
download | perl-27130c9a98b24c6442a9f796599b1927247c27ab.tar.gz |
Integrate from mainperl.
p4raw-id: //depot/cfgperl@3393
Diffstat (limited to 't')
-rwxr-xr-x | t/io/open.t | 3 | ||||
-rwxr-xr-x | t/op/magic.t | 2 | ||||
-rwxr-xr-x | t/op/method.t | 14 |
3 files changed, 17 insertions, 2 deletions
diff --git a/t/io/open.t b/t/io/open.t index 50ae38dff1..63079c8b77 100755 --- a/t/io/open.t +++ b/t/io/open.t @@ -8,9 +8,10 @@ print "1..9\n"; # my $file tests -unlink("afile.new") if -f "afile"; +unlink("afile") if -f "afile"; print "$!\nnot " unless open(my $f,"+>afile"); print "ok 1\n"; +binmode $f; print "not " unless -f "afile"; print "ok 2\n"; print "not " unless print $f "SomeData\n"; diff --git a/t/op/magic.t b/t/op/magic.t index 8486512b35..17246f6b8a 100755 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -155,9 +155,11 @@ EOF s/\.exe//i if $Is_Dos; s{\bminiperl\b}{perl}; # so that test doesn't fail with miniperl s{is perl}{is $perl}; # for systems where $^X is only a basename + s{\\}{/}g; ok 23, ($Is_MSWin32 ? uc($_) eq uc($s1) : $_ eq $s1), ":$_:!=:$s1:"; $_ = `$perl $script`; s/\.exe//i if $Is_Dos; + s{\\}{/}g; ok 24, ($Is_MSWin32 ? uc($_) eq uc($s1) : $_ eq $s1), ":$_:!=:$s1: after `$perl $script`"; ok 25, unlink($script), $!; } diff --git a/t/op/method.t b/t/op/method.t index 0912f1e10a..1c6f3c5d9d 100755 --- a/t/op/method.t +++ b/t/op/method.t @@ -4,7 +4,7 @@ # test method calls and autoloading. # -print "1..46\n"; +print "1..49\n"; @A::ISA = 'B'; @B::ISA = 'C'; @@ -155,3 +155,15 @@ test(A->eee(), "new B: In A::eee, 4"); # Which sticks # this test added due to bug discovery test(defined(@{"unknown_package::ISA"}) ? "defined" : "undefined", "undefined"); + +# test that failed subroutine calls don't affect method calls +{ + package A1; + sub foo { "foo" } + package A2; + @ISA = 'A1'; + package main; + test(A2->foo(), "foo"); + test(do { eval 'A2::foo()'; $@ ? 1 : 0}, 1); + test(A2->foo(), "foo"); +} |