1N/A#!./perl
1N/A
1N/ABEGIN {
1N/A chdir 't';
1N/A @INC = '../lib';
1N/A require './test.pl';
1N/A}
1N/A
1N/Aplan tests => 5;
1N/A
1N/Arequire_ok("B::Concise");
1N/A
1N/A$out = runperl(switches => ["-MO=Concise"], prog => '$a', stderr => 1);
1N/A
1N/A# If either of the next two tests fail, it probably means you need to
1N/A# fix the section labeled 'fragile kludge' in Concise.pm
1N/A
1N/A($op_base) = ($out =~ /^(\d+)\s*<0>\s*enter/m);
1N/A
1N/Ais($op_base, 1, "Smallest OP sequence number");
1N/A
1N/A($op_base_p1, $cop_base)
1N/A = ($out =~ /^(\d+)\s*<;>\s*nextstate\(main (-?\d+) /m);
1N/A
1N/Ais($op_base_p1, 2, "Second-smallest OP sequence number");
1N/A
1N/Ais($cop_base, 1, "Smallest COP sequence number");
1N/A
1N/A# test that with -exec B::Concise navigates past logops (bug #18175)
1N/A
1N/A$out = runperl(
1N/A switches => ["-MO=Concise,-exec"],
1N/A prog => q{$a||=$b && print q/foo/},
1N/A stderr => 1,
1N/A);
1N/A
1N/Alike($out, qr/print/, "-exec option with ||=");