From: Gurusamy Sarathy Date: Sat, 8 May 1999 00:07:11 +0000 (+0000) Subject: add test case for AUTOLOAD reentrancy fix in change#3279 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=16579924bacbac87c34f3081a8f33dd89ca0fbcb;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/t/lib/autoloader.t b/t/lib/autoloader.t index 47cace2..3bf690b 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";