summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-12-18 17:21:41 -0800
committerFather Chrysostomos <sprout@cpan.org>2010-12-18 17:22:21 -0800
commit9f47963d4156d454084c8456d1538bfe0fee3858 (patch)
treec17883be610e5ed3872316be388098cea7a1f181 /ext
parentc3e6accbfa366773737da407c6d6f1574c1a057a (diff)
downloadperl-9f47963d4156d454084c8456d1538bfe0fee3858.tar.gz
Test B::Concise’s -tree mode
Diffstat (limited to 'ext')
-rw-r--r--ext/B/t/concise.t15
1 files changed, 14 insertions, 1 deletions
diff --git a/ext/B/t/concise.t b/ext/B/t/concise.t
index b59701d2f5..3fdb6943fc 100644
--- a/ext/B/t/concise.t
+++ b/ext/B/t/concise.t
@@ -10,7 +10,7 @@ BEGIN {
require 'test.pl'; # we use runperl from 'test.pl', so can't use Test::More
}
-plan tests => 158;
+plan tests => 159;
require_ok("B::Concise");
@@ -435,4 +435,17 @@ $out = runperl ( switches => ["-MO=Concise"],
like $out, qr/nextstate.*nextstate/s,
'nulling of nextstate-nextstate happeneth not when $^P | PERLDBf_NOOPT';
+
+# A very basic test for -tree output
+$out =
+ runperl(
+ switches => ["-MO=Concise,-tree"], prog => 'print', stderr => 1
+ );
+ok index $out=~s/\r\n/\n/gr, <<'end'=~s/\r\n/\n/gr =>>= 0, '-tree output';
+<6>leave[1 ref]-+-<1>enter
+ |-<2>nextstate(main 1 -e:1)
+ `-<5>print-+-<3>pushmark
+ `-ex-rv2sv---<4>gvsv[*_]
+end
+
__END__