From: Stephen McCamant Date: Thu, 10 Jan 2002 18:21:34 +0000 (-0800) Subject: Re: Magic numbers in B::Concise X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c517cc4736790bd45b954954a7697e5f9867154c;p=p5sagit%2Fp5-mst-13.2.git Re: Magic numbers in B::Concise Message-ID: <15422.19502.380275.403187@soda.csua.berkeley.edu> p4raw-id: //depot/perl@14190 --- diff --git a/MANIFEST b/MANIFEST index da98206..5d4fa34 100644 --- a/MANIFEST +++ b/MANIFEST @@ -97,6 +97,7 @@ ext/B/t/asmdata.t See if B::Asmdata works ext/B/t/assembler.t See if B::Assembler, B::Disassembler comply ext/B/t/b.t See if B works ext/B/t/bblock.t See if B::Bblock works +ext/B/t/concise.t See whether B::Concise works ext/B/t/debug.t See if B::Debug works ext/B/t/deparse.t See if B::Deparse works ext/B/t/showlex.t See if B::ShowLex works diff --git a/ext/B/t/concise.t b/ext/B/t/concise.t new file mode 100644 index 0000000..ad29c20 --- /dev/null +++ b/ext/B/t/concise.t @@ -0,0 +1,24 @@ +#!./perl + +BEGIN { + chdir 't'; + @INC = '../lib'; + require './test.pl'; +} + +plan tests => 3; + +require_ok("B::Concise"); + +$out = runperl(switches => ["-MO=Concise"], prog => '$a', stderr => 1); + +# If either of the next two tests fail, it probably means you need to +# fix the section labeled 'fragile kludge' in Concise.pm + +$op_base = ($out =~ /^(\d+)\s*<0>\s*enter/m); + +is($op_base, 1, "Smallest OP sequence number", $help); + +$cop_base = ($out =~ /nextstate\(main (\d+) /); + +is($cop_base, 1, "Smallest COP sequence number", $help);