diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-08 00:07:11 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-08 00:07:11 +0000 |
commit | 16579924bacbac87c34f3081a8f33dd89ca0fbcb (patch) | |
tree | 5363077a428f82ed4746b992b5ec81bb72b2c9a1 /t | |
parent | 853846ea710f8feaed8c98b358bdc8967dd522d2 (diff) | |
download | perl-16579924bacbac87c34f3081a8f33dd89ca0fbcb.tar.gz |
add test case for AUTOLOAD reentrancy fix in change#3279
p4raw-link: @3279 on //depot/maint-5.004/perl: 0e728c71769b15d79c5e25115ecf62c06ac5c5ea
p4raw-id: //depot/perl@3327
Diffstat (limited to 't')
-rwxr-xr-x | t/lib/autoloader.t | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/t/lib/autoloader.t b/t/lib/autoloader.t index 47cace2024..3bf690bbdd 100755 --- a/t/lib/autoloader.t +++ b/t/lib/autoloader.t @@ -6,7 +6,7 @@ BEGIN { unshift @INC, ("./$dir", "../lib"); } -print "1..9\n"; +print "1..11\n"; # First we must set up some autoloader files mkdir $dir, 0755 or die "Can't mkdir $dir: $!"; @@ -88,12 +88,33 @@ print "ok 8\n"; print "not " unless $foo->bazmarkhianish($1) eq 'foo'; print "ok 9\n"; +# test recursive autoloads +open(F, ">$dir/auto/Foo/a.al") or die; +print F <<'EOT'; +package Foo; +BEGIN { b() } +sub a { print "ok 11\n"; } +1; +EOT +close(F); + +open(F, ">$dir/auto/Foo/b.al") or die; +print F <<'EOT'; +package Foo; +sub b { print "ok 10\n"; } +1; +EOT +close(F); +Foo::a(); + # cleanup END { return unless $dir && -d $dir; unlink "$dir/auto/Foo/foo.al"; unlink "$dir/auto/Foo/bar.al"; unlink "$dir/auto/Foo/bazmarkhian.al"; +unlink "$dir/auto/Foo/a.al"; +unlink "$dir/auto/Foo/b.al"; rmdir "$dir/auto/Foo"; rmdir "$dir/auto"; rmdir "$dir"; |