This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
The tests for the -ostash option to B::Concise will have been failing
authorNicholas Clark <nick@ccl4.org>
Tue, 23 Sep 2008 13:31:26 +0000 (13:31 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 23 Sep 2008 13:31:26 +0000 (13:31 +0000)
for -Uusedl since they were added. For now, test with a non-XS module,
and TODO the test with the XS module when usedl is undefined.

p4raw-id: //depot/perl@34406

ext/B/t/concise.t

index 4055522..7b4df88 100644 (file)
@@ -16,7 +16,7 @@ BEGIN {
     require 'test.pl';         # we use runperl from 'test.pl', so can't use Test::More
 }
 
-plan tests => 156;
+plan tests => 157;
 
 require_ok("B::Concise");
 
@@ -407,12 +407,21 @@ like($out, qr/PAD_FAKELEX_MULTI is a constant sub, optimized to a IV/,
 like($out, qr/\# 4\d\d: \s+ \$l->concise\(\$level\);/,
      "src-line rendering works");
 
-$out = runperl ( switches => ["-MO=Concise,-stash=Data::Dumper,-src,-exec"],
+$out = runperl ( switches => ["-MO=Concise,-stash=ExtUtils::Mksymlists,-src,-exec"],
                 prog => '-e 1', stderr => 1 );
 
-like($out, qr/FUNC: \*Data::Dumper::format_refaddr/,
+like($out, qr/FUNC: \*ExtUtils::Mksymlists::_write_vms/,
      "stash rendering loads package as needed");
 
+$out = runperl ( switches => ["-MO=Concise,-stash=Data::Dumper,-src,-exec"],
+                prog => '-e 1', stderr => 1 );
+
+{
+    local $TODO = q(require $package unless ${$package.'::'}; doesn't do what you want under static linking) unless $Config{usedl};
+    like($out, qr/FUNC: \*Data::Dumper::format_refaddr/,
+         "stash rendering loads package as needed");
+}
+
 my $prog = q{package FOO; sub bar { print "bar" } package main; FOO::bar(); };
 
 # this would fail if %INC used for -stash test