From c517cc4736790bd45b954954a7697e5f9867154c Mon Sep 17 00:00:00 2001 From: Stephen McCamant Date: Thu, 10 Jan 2002 10:21:34 -0800 Subject: [PATCH] Re: Magic numbers in B::Concise Message-ID: <15422.19502.380275.403187@soda.csua.berkeley.edu> p4raw-id: //depot/perl@14190 --- MANIFEST | 1 + ext/B/t/concise.t | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 ext/B/t/concise.t 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); -- 2.7.4