From 4d3af52d85ceb40bfea0be8d4bab3c95a3323437 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 23 Sep 2008 13:31:26 +0000 Subject: [PATCH] The tests for the -ostash option to B::Concise will have been failing 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 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ext/B/t/concise.t b/ext/B/t/concise.t index 4055522..7b4df88 100644 --- a/ext/B/t/concise.t +++ b/ext/B/t/concise.t @@ -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 -- 2.7.4