This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: Magic numbers in B::Concise
authorStephen McCamant <smcc@mit.edu>
Thu, 10 Jan 2002 18:21:34 +0000 (10:21 -0800)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 11 Jan 2002 14:52:51 +0000 (14:52 +0000)
Message-ID: <15422.19502.380275.403187@soda.csua.berkeley.edu>

p4raw-id: //depot/perl@14190

MANIFEST
ext/B/t/concise.t [new file with mode: 0644]

index da98206..5d4fa34 100644 (file)
--- 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/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
 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 (file)
index 0000000..ad29c20
--- /dev/null
@@ -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);