3 # This tests the B:: module(s) with CHECK, BEGIN, END and INIT blocks. The
4 # text excerpts below marked with "# " in front are the expected output. They
5 # are there twice, EOT for threading, and EONT for a non-threading Perl. The
6 # output is matched losely. If the match fails even though the "got" and
7 # "expected" output look exactly the same, then watch for trailing, invisible
13 if (($Config::Config{'extensions'} !~ /\bB\b/) ){
14 print "1..0 # Skip -- Perl configured without B module\n";
19 # import checkOptree(), and %gOpts (containing test state)
20 use OptreeCheck; # ALSO DOES @ARGV HANDLING !!!!!!
25 require_ok("B::Concise");
28 switches => ["-MO=Concise,BEGIN,CHECK,INIT,END,-exec"],
29 prog => q{$a=$b && print q/foo/},
34 my $src = q[our ($beg, $chk, $init, $end, $uc) = qq{'foo'}; BEGIN { $beg++ } CHECK { $chk++ } INIT { $init++ } END { $end++ } UNITCHECK {$uc++}];
37 checkOptree ( name => 'BEGIN',
40 strip_open_hints => 1,
41 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
42 # - <@> lineseq KP ->7
43 # 1 <;> nextstate(B::Concise -1151 Concise.pm:116) v:*,&,{,x*,x&,x$,$ ->2
44 # 6 <2> sassign sKS/2 ->7
45 # 4 <1> srefgen sK/1 ->5
46 # - <1> ex-list lKRM ->4
47 # 3 <1> rv2gv sKRM/STRICT,1 ->4
48 # 2 <#> gv[*STDOUT] s ->3
49 # - <1> ex-rv2sv sKRM*/STRICT,1 ->6
50 # 5 <#> gvsv[*B::Concise::walkHandle] s ->6
52 # h <1> leavesub[1 ref] K/REFC,1 ->(end)
54 # 8 <;> nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$ ->9
55 # a <1> require sK/1 ->b
56 # 9 <$> const[PV "strict.pm"] s/BARE ->a
57 # - <;> ex-nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$ ->b
59 # b <;> nextstate(B::Concise -1113 Concise.pm:181) :*,&,x*,x&,x$,$ ->c
60 # g <1> entersub[t1] KRS*/TARG,STRICT ->h
61 # c <0> pushmark s ->d
62 # d <$> const[PV "strict"] sM ->e
63 # e <$> const[PV "refs"] sM ->f
64 # f <.> method_named[PV "unimport"] ->g
66 # r <1> leavesub[1 ref] K/REFC,1 ->(end)
68 # i <;> nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$ ->j
69 # k <1> require sK/1 ->l
70 # j <$> const[PV "strict.pm"] s/BARE ->k
71 # - <;> ex-nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$ ->l
73 # l <;> nextstate(B::Concise -1010 Concise.pm:303) :*,&,x*,x&,x$,$ ->m
74 # q <1> entersub[t1] KRS*/TARG,STRICT ->r
75 # m <0> pushmark s ->n
76 # n <$> const[PV "strict"] sM ->o
77 # o <$> const[PV "refs"] sM ->p
78 # p <.> method_named[PV "unimport"] ->q
80 # 11 <1> leavesub[1 ref] K/REFC,1 ->(end)
81 # - <@> lineseq KP ->11
82 # s <;> nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$ ->t
83 # u <1> require sK/1 ->v
84 # t <$> const[PV "strict.pm"] s/BARE ->u
85 # - <;> ex-nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$ ->v
87 # v <;> nextstate(B::Concise -963 Concise.pm:368) :*,&,{,x*,x&,x$,$ ->w
88 # 10 <1> entersub[t1] KRS*/TARG,STRICT ->11
89 # w <0> pushmark s ->x
90 # x <$> const[PV "strict"] sM ->y
91 # y <$> const[PV "refs"] sM ->z
92 # z <.> method_named[PV "unimport"] ->10
94 # 1b <1> leavesub[1 ref] K/REFC,1 ->(end)
95 # - <@> lineseq K ->1b
96 # 12 <;> nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$ ->13
97 # 14 <1> require sK/1 ->15
98 # 13 <$> const[PV "strict.pm"] s/BARE ->14
99 # - <;> ex-nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$ ->15
100 # - <@> lineseq K ->-
101 # 15 <;> nextstate(B::Concise -938 Concise.pm:388) :*,&,x*,x&,x$,$ ->16
102 # 1a <1> entersub[t1] KRS*/TARG,STRICT ->1b
103 # 16 <0> pushmark s ->17
104 # 17 <$> const[PV "strict"] sM ->18
105 # 18 <$> const[PV "refs"] sM ->19
106 # 19 <.> method_named[PV "unimport"] ->1a
108 # 1l <1> leavesub[1 ref] K/REFC,1 ->(end)
109 # - <@> lineseq KP ->1l
110 # 1c <;> nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$ ->1d
111 # 1e <1> require sK/1 ->1f
112 # 1d <$> const[PV "warnings.pm"] s/BARE ->1e
113 # - <;> ex-nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$ ->1f
114 # - <@> lineseq K ->-
115 # 1f <;> nextstate(B::Concise -924 Concise.pm:408) :*,&,{,x*,x&,x$,$ ->1g
116 # 1k <1> entersub[t1] KRS*/TARG,STRICT ->1l
117 # 1g <0> pushmark s ->1h
118 # 1h <$> const[PV "warnings"] sM ->1i
119 # 1i <$> const[PV "qw"] sM ->1j
120 # 1j <.> method_named[PV "unimport"] ->1k
122 # 1p <1> leavesub[1 ref] K/REFC,1 ->(end)
123 # - <@> lineseq KP ->1p
124 # 1m <;> nextstate(main 3 -e:1) v:{ ->1n
125 # 1o <1> postinc[t3] sK/1 ->1p
126 # - <1> ex-rv2sv sKRM/1 ->1o
127 # 1n <#> gvsv[*beg] s ->1o
130 # 7 <1> leavesub[1 ref] K/REFC,1 ->(end)
131 # - <@> lineseq KP ->7
132 # 1 <;> nextstate(B::Concise -1151 Concise.pm:116) v:*,&,{,x*,x&,x$,$ ->2
133 # 6 <2> sassign sKS/2 ->7
134 # 4 <1> srefgen sK/1 ->5
135 # - <1> ex-list lKRM ->4
136 # 3 <1> rv2gv sKRM/STRICT,1 ->4
137 # 2 <$> gv(*STDOUT) s ->3
138 # - <1> ex-rv2sv sKRM*/STRICT,1 ->6
139 # 5 <$> gvsv(*B::Concise::walkHandle) s ->6
141 # h <1> leavesub[1 ref] K/REFC,1 ->(end)
142 # - <@> lineseq K ->h
143 # 8 <;> nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$ ->9
144 # a <1> require sK/1 ->b
145 # 9 <$> const(PV "strict.pm") s/BARE ->a
146 # - <;> ex-nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$ ->b
147 # - <@> lineseq K ->-
148 # b <;> nextstate(B::Concise -1113 Concise.pm:181) :*,&,x*,x&,x$,$ ->c
149 # g <1> entersub[t1] KRS*/TARG,STRICT ->h
150 # c <0> pushmark s ->d
151 # d <$> const(PV "strict") sM ->e
152 # e <$> const(PV "refs") sM ->f
153 # f <.> method_named(PV "unimport") ->g
155 # r <1> leavesub[1 ref] K/REFC,1 ->(end)
156 # - <@> lineseq K ->r
157 # i <;> nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$ ->j
158 # k <1> require sK/1 ->l
159 # j <$> const(PV "strict.pm") s/BARE ->k
160 # - <;> ex-nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$ ->l
161 # - <@> lineseq K ->-
162 # l <;> nextstate(B::Concise -1010 Concise.pm:303) :*,&,x*,x&,x$,$ ->m
163 # q <1> entersub[t1] KRS*/TARG,STRICT ->r
164 # m <0> pushmark s ->n
165 # n <$> const(PV "strict") sM ->o
166 # o <$> const(PV "refs") sM ->p
167 # p <.> method_named(PV "unimport") ->q
169 # 11 <1> leavesub[1 ref] K/REFC,1 ->(end)
170 # - <@> lineseq KP ->11
171 # s <;> nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$ ->t
172 # u <1> require sK/1 ->v
173 # t <$> const(PV "strict.pm") s/BARE ->u
174 # - <;> ex-nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$ ->v
175 # - <@> lineseq K ->-
176 # v <;> nextstate(B::Concise -963 Concise.pm:368) :*,&,{,x*,x&,x$,$ ->w
177 # 10 <1> entersub[t1] KRS*/TARG,STRICT ->11
178 # w <0> pushmark s ->x
179 # x <$> const(PV "strict") sM ->y
180 # y <$> const(PV "refs") sM ->z
181 # z <.> method_named(PV "unimport") ->10
183 # 1b <1> leavesub[1 ref] K/REFC,1 ->(end)
184 # - <@> lineseq K ->1b
185 # 12 <;> nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$ ->13
186 # 14 <1> require sK/1 ->15
187 # 13 <$> const(PV "strict.pm") s/BARE ->14
188 # - <;> ex-nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$ ->15
189 # - <@> lineseq K ->-
190 # 15 <;> nextstate(B::Concise -938 Concise.pm:388) :*,&,x*,x&,x$,$ ->16
191 # 1a <1> entersub[t1] KRS*/TARG,STRICT ->1b
192 # 16 <0> pushmark s ->17
193 # 17 <$> const(PV "strict") sM ->18
194 # 18 <$> const(PV "refs") sM ->19
195 # 19 <.> method_named(PV "unimport") ->1a
197 # 1l <1> leavesub[1 ref] K/REFC,1 ->(end)
198 # - <@> lineseq KP ->1l
199 # 1c <;> nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$ ->1d
200 # 1e <1> require sK/1 ->1f
201 # 1d <$> const(PV "warnings.pm") s/BARE ->1e
202 # - <;> ex-nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$ ->1f
203 # - <@> lineseq K ->-
204 # 1f <;> nextstate(B::Concise -924 Concise.pm:408) :*,&,{,x*,x&,x$,$ ->1g
205 # 1k <1> entersub[t1] KRS*/TARG,STRICT ->1l
206 # 1g <0> pushmark s ->1h
207 # 1h <$> const(PV "warnings") sM ->1i
208 # 1i <$> const(PV "qw") sM ->1j
209 # 1j <.> method_named(PV "unimport") ->1k
211 # 1p <1> leavesub[1 ref] K/REFC,1 ->(end)
212 # - <@> lineseq KP ->1p
213 # 1m <;> nextstate(main 3 -e:1) v:{ ->1n
214 # 1o <1> postinc[t2] sK/1 ->1p
215 # - <1> ex-rv2sv sKRM/1 ->1o
216 # 1n <$> gvsv(*beg) s ->1o
219 checkOptree ( name => 'END',
222 strip_open_hints => 1,
223 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
225 # 4 <1> leavesub[1 ref] K/REFC,1 ->(end)
226 # - <@> lineseq KP ->4
227 # 1 <;> nextstate(main 5 -e:6) v:>,<,%,{ ->2
228 # 3 <1> postinc[t3] sK/1 ->4
229 # - <1> ex-rv2sv sKRM/1 ->3
230 # 2 <#> gvsv[*end] s ->3
233 # 4 <1> leavesub[1 ref] K/REFC,1 ->(end)
234 # - <@> lineseq KP ->4
235 # 1 <;> nextstate(main 5 -e:6) v:>,<,%,{ ->2
236 # 3 <1> postinc[t2] sK/1 ->4
237 # - <1> ex-rv2sv sKRM/1 ->3
238 # 2 <$> gvsv(*end) s ->3
241 checkOptree ( name => 'CHECK',
244 strip_open_hints => 1,
245 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
247 # 4 <1> leavesub[1 ref] K/REFC,1 ->(end)
248 # - <@> lineseq KP ->4
249 # 1 <;> nextstate(main 3 -e:4) v:>,<,%,{ ->2
250 # 3 <1> postinc[t3] sK/1 ->4
251 # - <1> ex-rv2sv sKRM/1 ->3
252 # 2 <#> gvsv[*chk] s ->3
255 # 4 <1> leavesub[1 ref] K/REFC,1 ->(end)
256 # - <@> lineseq KP ->4
257 # 1 <;> nextstate(main 3 -e:4) v:>,<,%,{ ->2
258 # 3 <1> postinc[t2] sK/1 ->4
259 # - <1> ex-rv2sv sKRM/1 ->3
260 # 2 <$> gvsv(*chk) s ->3
263 checkOptree ( name => 'UNITCHECK',
264 bcopts=> 'UNITCHECK',
266 strip_open_hints => 1,
267 expect=> <<'EOT_EOT', expect_nt => <<'EONT_EONT');
269 # 4 <1> leavesub[1 ref] K/REFC,1 ->(end)
270 # - <@> lineseq KP ->4
271 # 1 <;> nextstate(main 3 -e:4) v:>,<,%,{ ->2
272 # 3 <1> postinc[t3] sK/1 ->4
273 # - <1> ex-rv2sv sKRM/1 ->3
274 # 2 <#> gvsv[*uc] s ->3
277 # 4 <1> leavesub[1 ref] K/REFC,1 ->(end)
278 # - <@> lineseq KP ->4
279 # 1 <;> nextstate(main 3 -e:4) v:>,<,%,{ ->2
280 # 3 <1> postinc[t2] sK/1 ->4
281 # - <1> ex-rv2sv sKRM/1 ->3
282 # 2 <$> gvsv(*uc) s ->3
285 checkOptree ( name => 'INIT',
287 #todo => 'get working',
289 strip_open_hints => 1,
290 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
292 # 4 <1> leavesub[1 ref] K/REFC,1 ->(end)
293 # - <@> lineseq KP ->4
294 # 1 <;> nextstate(main 4 -e:5) v:>,<,%,{ ->2
295 # 3 <1> postinc[t3] sK/1 ->4
296 # - <1> ex-rv2sv sKRM/1 ->3
297 # 2 <#> gvsv[*init] s ->3
300 # 4 <1> leavesub[1 ref] K/REFC,1 ->(end)
301 # - <@> lineseq KP ->4
302 # 1 <;> nextstate(main 4 -e:5) v:>,<,%,{ ->2
303 # 3 <1> postinc[t2] sK/1 ->4
304 # - <1> ex-rv2sv sKRM/1 ->3
305 # 2 <$> gvsv(*init) s ->3
308 checkOptree ( name => 'all of BEGIN END INIT CHECK UNITCHECK -exec',
309 bcopts => [qw/ BEGIN END INIT CHECK UNITCHECK -exec /],
311 strip_open_hints => 1,
312 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
314 # 1 <;> nextstate(B::Concise -1151 Concise.pm:116) v:*,&,{,x*,x&,x$,$
315 # 2 <#> gv[*STDOUT] s
316 # 3 <1> rv2gv sKRM/STRICT,1
318 # 5 <#> gvsv[*B::Concise::walkHandle] s
319 # 6 <2> sassign sKS/2
320 # 7 <1> leavesub[1 ref] K/REFC,1
322 # 8 <;> nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$
323 # 9 <$> const[PV "strict.pm"] s/BARE
325 # b <;> nextstate(B::Concise -1113 Concise.pm:181) :*,&,x*,x&,x$,$
327 # d <$> const[PV "strict"] sM
328 # e <$> const[PV "refs"] sM
329 # f <.> method_named[PV "unimport"]
330 # g <1> entersub[t1] KRS*/TARG,STRICT
331 # h <1> leavesub[1 ref] K/REFC,1
333 # i <;> nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$
334 # j <$> const[PV "strict.pm"] s/BARE
336 # l <;> nextstate(B::Concise -1010 Concise.pm:303) :*,&,x*,x&,x$,$
338 # n <$> const[PV "strict"] sM
339 # o <$> const[PV "refs"] sM
340 # p <.> method_named[PV "unimport"]
341 # q <1> entersub[t1] KRS*/TARG,STRICT
342 # r <1> leavesub[1 ref] K/REFC,1
344 # s <;> nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$
345 # t <$> const[PV "strict.pm"] s/BARE
347 # v <;> nextstate(B::Concise -963 Concise.pm:368) :*,&,{,x*,x&,x$,$
349 # x <$> const[PV "strict"] sM
350 # y <$> const[PV "refs"] sM
351 # z <.> method_named[PV "unimport"]
352 # 10 <1> entersub[t1] KRS*/TARG,STRICT
353 # 11 <1> leavesub[1 ref] K/REFC,1
355 # 12 <;> nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$
356 # 13 <$> const[PV "strict.pm"] s/BARE
357 # 14 <1> require sK/1
358 # 15 <;> nextstate(B::Concise -938 Concise.pm:388) :*,&,x*,x&,x$,$
360 # 17 <$> const[PV "strict"] sM
361 # 18 <$> const[PV "refs"] sM
362 # 19 <.> method_named[PV "unimport"]
363 # 1a <1> entersub[t1] KRS*/TARG,STRICT
364 # 1b <1> leavesub[1 ref] K/REFC,1
366 # 1c <;> nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$
367 # 1d <$> const[PV "warnings.pm"] s/BARE
368 # 1e <1> require sK/1
369 # 1f <;> nextstate(B::Concise -924 Concise.pm:408) :*,&,{,x*,x&,x$,$
371 # 1h <$> const[PV "warnings"] sM
372 # 1i <$> const[PV "qw"] sM
373 # 1j <.> method_named[PV "unimport"]
374 # 1k <1> entersub[t1] KRS*/TARG,STRICT
375 # 1l <1> leavesub[1 ref] K/REFC,1
377 # 1m <;> nextstate(main 3 -e:1) v:{
378 # 1n <#> gvsv[*beg] s
379 # 1o <1> postinc[t3] sK/1
380 # 1p <1> leavesub[1 ref] K/REFC,1
382 # 1q <;> nextstate(main 9 -e:1) v:{
383 # 1r <#> gvsv[*end] s
384 # 1s <1> postinc[t3] sK/1
385 # 1t <1> leavesub[1 ref] K/REFC,1
387 # 1u <;> nextstate(main 7 -e:1) v:{
388 # 1v <#> gvsv[*init] s
389 # 1w <1> postinc[t3] sK/1
390 # 1x <1> leavesub[1 ref] K/REFC,1
392 # 1y <;> nextstate(main 5 -e:1) v:{
393 # 1z <#> gvsv[*chk] s
394 # 20 <1> postinc[t3] sK/1
395 # 21 <1> leavesub[1 ref] K/REFC,1
397 # 22 <;> nextstate(main 11 -e:1) v:{
399 # 24 <1> postinc[t3] sK/1
400 # 25 <1> leavesub[1 ref] K/REFC,1
403 # 1 <;> nextstate(B::Concise -1151 Concise.pm:116) v:*,&,{,x*,x&,x$,$
404 # 2 <$> gv(*STDOUT) s
405 # 3 <1> rv2gv sKRM/STRICT,1
407 # 5 <$> gvsv(*B::Concise::walkHandle) s
408 # 6 <2> sassign sKS/2
409 # 7 <1> leavesub[1 ref] K/REFC,1
411 # 8 <;> nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$
412 # 9 <$> const(PV "strict.pm") s/BARE
414 # b <;> nextstate(B::Concise -1113 Concise.pm:181) :*,&,x*,x&,x$,$
416 # d <$> const(PV "strict") sM
417 # e <$> const(PV "refs") sM
418 # f <.> method_named(PV "unimport")
419 # g <1> entersub[t1] KRS*/TARG,STRICT
420 # h <1> leavesub[1 ref] K/REFC,1
422 # i <;> nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$
423 # j <$> const(PV "strict.pm") s/BARE
425 # l <;> nextstate(B::Concise -1010 Concise.pm:303) :*,&,x*,x&,x$,$
427 # n <$> const(PV "strict") sM
428 # o <$> const(PV "refs") sM
429 # p <.> method_named(PV "unimport")
430 # q <1> entersub[t1] KRS*/TARG,STRICT
431 # r <1> leavesub[1 ref] K/REFC,1
433 # s <;> nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$
434 # t <$> const(PV "strict.pm") s/BARE
436 # v <;> nextstate(B::Concise -963 Concise.pm:368) :*,&,{,x*,x&,x$,$
438 # x <$> const(PV "strict") sM
439 # y <$> const(PV "refs") sM
440 # z <.> method_named(PV "unimport")
441 # 10 <1> entersub[t1] KRS*/TARG,STRICT
442 # 11 <1> leavesub[1 ref] K/REFC,1
444 # 12 <;> nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$
445 # 13 <$> const(PV "strict.pm") s/BARE
446 # 14 <1> require sK/1
447 # 15 <;> nextstate(B::Concise -938 Concise.pm:388) :*,&,x*,x&,x$,$
449 # 17 <$> const(PV "strict") sM
450 # 18 <$> const(PV "refs") sM
451 # 19 <.> method_named(PV "unimport")
452 # 1a <1> entersub[t1] KRS*/TARG,STRICT
453 # 1b <1> leavesub[1 ref] K/REFC,1
455 # 1c <;> nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$
456 # 1d <$> const(PV "warnings.pm") s/BARE
457 # 1e <1> require sK/1
458 # 1f <;> nextstate(B::Concise -924 Concise.pm:408) :*,&,{,x*,x&,x$,$
460 # 1h <$> const(PV "warnings") sM
461 # 1i <$> const(PV "qw") sM
462 # 1j <.> method_named(PV "unimport")
463 # 1k <1> entersub[t1] KRS*/TARG,STRICT
464 # 1l <1> leavesub[1 ref] K/REFC,1
466 # 1m <;> nextstate(main 3 -e:1) v:{
467 # 1n <$> gvsv(*beg) s
468 # 1o <1> postinc[t2] sK/1
469 # 1p <1> leavesub[1 ref] K/REFC,1
471 # 1q <;> nextstate(main 9 -e:1) v:{
472 # 1r <$> gvsv(*end) s
473 # 1s <1> postinc[t2] sK/1
474 # 1t <1> leavesub[1 ref] K/REFC,1
476 # 1u <;> nextstate(main 7 -e:1) v:{
477 # 1v <$> gvsv(*init) s
478 # 1w <1> postinc[t2] sK/1
479 # 1x <1> leavesub[1 ref] K/REFC,1
481 # 1y <;> nextstate(main 5 -e:1) v:{
482 # 1z <$> gvsv(*chk) s
483 # 20 <1> postinc[t2] sK/1
484 # 21 <1> leavesub[1 ref] K/REFC,1
486 # 22 <;> nextstate(main 11 -e:1) v:{
488 # 24 <1> postinc[t2] sK/1
489 # 25 <1> leavesub[1 ref] K/REFC,1
492 # perl "-I../lib" -MO=Concise,BEGIN,CHECK,INIT,END,-exec -e '$a=$b && print q/foo/'
494 checkOptree ( name => 'regression test for patch 25352',
495 bcopts => [qw/ BEGIN END INIT CHECK -exec /],
496 prog => 'print q/foo/',
497 expect => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
499 # 1 <;> nextstate(B::Concise -275 Concise.pm:356) v:*,&,{,x*,x&,x$,$
500 # 2 <#> gv[*STDOUT] s
501 # 3 <1> rv2gv sKRM/STRICT,1
503 # 5 <#> gvsv[*B::Concise::walkHandle] s
504 # 6 <2> sassign sKS/2
505 # 7 <1> leavesub[1 ref] K/REFC,1
507 # 8 <;> nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$
508 # 9 <$> const[PV "strict.pm"] s/BARE
510 # b <;> nextstate(B::Concise -1113 Concise.pm:181) :*,&,x*,x&,x$,$
512 # d <$> const[PV "strict"] sM
513 # e <$> const[PV "refs"] sM
514 # f <.> method_named[PV "unimport"]
515 # g <1> entersub[t1] KRS*/TARG,STRICT
516 # h <1> leavesub[1 ref] K/REFC,1
518 # i <;> nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$
519 # j <$> const[PV "strict.pm"] s/BARE
521 # l <;> nextstate(B::Concise -1010 Concise.pm:303) :*,&,x*,x&,x$,$
523 # n <$> const[PV "strict"] sM
524 # o <$> const[PV "refs"] sM
525 # p <.> method_named[PV "unimport"]
526 # q <1> entersub[t1] KRS*/TARG,STRICT
527 # r <1> leavesub[1 ref] K/REFC,1
529 # s <;> nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$
530 # t <$> const[PV "strict.pm"] s/BARE
532 # v <;> nextstate(B::Concise -963 Concise.pm:368) :*,&,{,x*,x&,x$,$
534 # x <$> const[PV "strict"] sM
535 # y <$> const[PV "refs"] sM
536 # z <.> method_named[PV "unimport"]
537 # 10 <1> entersub[t1] KRS*/TARG,STRICT
538 # 11 <1> leavesub[1 ref] K/REFC,1
540 # 12 <;> nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$
541 # 13 <$> const[PV "strict.pm"] s/BARE
542 # 14 <1> require sK/1
543 # 15 <;> nextstate(B::Concise -938 Concise.pm:388) :*,&,x*,x&,x$,$
545 # 17 <$> const[PV "strict"] sM
546 # 18 <$> const[PV "refs"] sM
547 # 19 <.> method_named[PV "unimport"]
548 # 1a <1> entersub[t1] KRS*/TARG,STRICT
549 # 1b <1> leavesub[1 ref] K/REFC,1
551 # 1c <;> nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$
552 # 1d <$> const[PV "warnings.pm"] s/BARE
553 # 1e <1> require sK/1
554 # 1f <;> nextstate(B::Concise -924 Concise.pm:408) :*,&,{,x*,x&,x$,$
556 # 1h <$> const[PV "warnings"] sM
557 # 1i <$> const[PV "qw"] sM
558 # 1j <.> method_named[PV "unimport"]
559 # 1k <1> entersub[t1] KRS*/TARG,STRICT
560 # 1l <1> leavesub[1 ref] K/REFC,1
563 # 1 <;> nextstate(B::Concise -1151 Concise.pm:116) v:*,&,{,x*,x&,x$,$
564 # 2 <$> gv(*STDOUT) s
565 # 3 <1> rv2gv sKRM/STRICT,1
567 # 5 <$> gvsv(*B::Concise::walkHandle) s
568 # 6 <2> sassign sKS/2
569 # 7 <1> leavesub[1 ref] K/REFC,1
571 # 8 <;> nextstate(B::Concise -1113 Concise.pm:181) v:*,&,x*,x&,x$,$
572 # 9 <$> const(PV "strict.pm") s/BARE
574 # b <;> nextstate(B::Concise -1113 Concise.pm:181) :*,&,x*,x&,x$,$
576 # d <$> const(PV "strict") sM
577 # e <$> const(PV "refs") sM
578 # f <.> method_named(PV "unimport")
579 # g <1> entersub[t1] KRS*/TARG,STRICT
580 # h <1> leavesub[1 ref] K/REFC,1
582 # i <;> nextstate(B::Concise -1010 Concise.pm:303) v:*,&,x*,x&,x$,$
583 # j <$> const(PV "strict.pm") s/BARE
585 # l <;> nextstate(B::Concise -1010 Concise.pm:303) :*,&,x*,x&,x$,$
587 # n <$> const(PV "strict") sM
588 # o <$> const(PV "refs") sM
589 # p <.> method_named(PV "unimport")
590 # q <1> entersub[t1] KRS*/TARG,STRICT
591 # r <1> leavesub[1 ref] K/REFC,1
593 # s <;> nextstate(B::Concise -963 Concise.pm:368) v:*,&,{,x*,x&,x$,$
594 # t <$> const(PV "strict.pm") s/BARE
596 # v <;> nextstate(B::Concise -963 Concise.pm:368) :*,&,{,x*,x&,x$,$
598 # x <$> const(PV "strict") sM
599 # y <$> const(PV "refs") sM
600 # z <.> method_named(PV "unimport")
601 # 10 <1> entersub[t1] KRS*/TARG,STRICT
602 # 11 <1> leavesub[1 ref] K/REFC,1
604 # 12 <;> nextstate(B::Concise -938 Concise.pm:388) v:*,&,x*,x&,x$,$
605 # 13 <$> const(PV "strict.pm") s/BARE
606 # 14 <1> require sK/1
607 # 15 <;> nextstate(B::Concise -938 Concise.pm:388) :*,&,x*,x&,x$,$
609 # 17 <$> const(PV "strict") sM
610 # 18 <$> const(PV "refs") sM
611 # 19 <.> method_named(PV "unimport")
612 # 1a <1> entersub[t1] KRS*/TARG,STRICT
613 # 1b <1> leavesub[1 ref] K/REFC,1
615 # 1c <;> nextstate(B::Concise -924 Concise.pm:408) v:*,&,{,x*,x&,x$,$
616 # 1d <$> const(PV "warnings.pm") s/BARE
617 # 1e <1> require sK/1
618 # 1f <;> nextstate(B::Concise -924 Concise.pm:408) :*,&,{,x*,x&,x$,$
620 # 1h <$> const(PV "warnings") sM
621 # 1i <$> const(PV "qw") sM
622 # 1j <.> method_named(PV "unimport")
623 # 1k <1> entersub[t1] KRS*/TARG,STRICT
624 # 1l <1> leavesub[1 ref] K/REFC,1