Cross Reference: concise.t
xref
: /
osnet-11
/
usr
/
src
/
cmd
/
perl
/
5.8.4
/
distrib
/
ext
/
B
/
t
/
concise.t
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
1
N/A
#!./perl
1
N/A
1
N/A
BEGIN
{
1
N/A
chdir
't'
;
1
N/A
@
INC
=
'../lib'
;
1
N/A
require
'./
test.pl
'
;
1
N/A
}
1
N/A
1
N/A
plan
tests
=>
5
;
1
N/A
1
N/A
require_ok
(
"B::Concise"
)
;
1
N/A
1
N/A
$out
=
runperl
(
switches
=> [
"-MO=Concise"
],
prog
=>
'$a'
,
stderr
=>
1
)
;
1
N/A
1
N/A
# If either of the next two tests fail, it probably means you need to
1
N/A
# fix the section labeled 'fragile kludge' in
Concise.pm
1
N/A
1
N/A
(
$op_base
)
=
(
$out
=~ /^
(\d+)
\s*<
0
>\s*
enter
/m)
;
1
N/A
1
N/A
is
(
$op_base
,
1
,
"Smallest OP sequence number"
)
;
1
N/A
1
N/A
(
$op_base_p1
,
$cop_base
)
1
N/A
=
(
$out
=~ /^
(\d+)
\s*<;>\s*
nextstate
\(
main
(-?\d+)
/m)
;
1
N/A
1
N/A
is
(
$op_base_p1
,
2
,
"Second-smallest OP sequence number"
)
;
1
N/A
1
N/A
is
(
$cop_base
,
1
,
"Smallest COP sequence number"
)
;
1
N/A
1
N/A
# test that with -exec B::Concise navigates past logops (bug #18175)
1
N/A
1
N/A
$out
=
runperl
(
1
N/A
switches
=> [
"-MO=Concise,-exec"
],
1
N/A
prog
=> q{$a||=$b &&
print
q
/
foo
/},
1
N/A
stderr
=>
1
,
1
N/A
)
;
1
N/A
1
N/A
like
(
$out
,
qr
/
print
/,
"-exec option with ||="
)
;