This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make ext/B work with 5.16.x
[perl5.git] / ext / B / t / optree_misc.t
index 5b623f5..747a1ed 100644 (file)
@@ -65,7 +65,30 @@ EONT_EONT
 checkOptree ( name     => 'PMOP children',
              code      => sub { $foo =~ s/(a)/$1/ },
              strip_open_hints => 1,
-             expect    => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
+             ( $] < 5.017002
+               ?  (expect => <<'EOT_EOT16', expect_nt => <<'EONT_EONT16')
+# 6  <1> leavesub[1 ref] K/REFC,1 ->(end)
+# -     <@> lineseq KP ->6
+# 1        <;> nextstate(main 1 -e:1) v:>,<,%,{ ->2
+# 3        </> subst(/"(a)"/ replstart->4) KS ->6
+# -           <1> ex-rv2sv sKRM/1 ->3
+# 2              <#> gvsv[*foo] s ->3
+# 5           <|> substcont(other->3) sK/1 ->(end)
+# -              <1> ex-rv2sv sK/1 ->5
+# 4                 <#> gvsv[*1] s ->5
+EOT_EOT16
+# 6  <1> leavesub[1 ref] K/REFC,1 ->(end)
+# -     <@> lineseq KP ->6
+# 1        <;> nextstate(main 1 -e:1) v:>,<,%,{ ->2
+# 3        </> subst(/"(a)"/ replstart->4) KS ->6
+# -           <1> ex-rv2sv sKRM/1 ->3
+# 2              <$> gvsv(*foo) s ->3
+# 5           <|> substcont(other->3) sK/1 ->(end)
+# -              <1> ex-rv2sv sK/1 ->5
+# 4                 <$> gvsv(*1) s ->5
+EONT_EONT16
+
+               :  (expect => <<'EOT_EOT',   expect_nt => <<'EONT_EONT')));
 # 5  <1> leavesub[1 ref] K/REFC,1 ->(end)
 # -     <@> lineseq KP ->5
 # 1        <;> nextstate(main 1 -e:1) v:>,<,%,{ ->2
@@ -131,6 +154,7 @@ checkOptree ( name      => 'formats',
              bcopts    => 'STDOUT',
              progfile  => $tmpfile,
              strip_open_hints => 1,
+             skip      => ($] < 5.017003),
              expect    => <<'EOT_EOT', expect_nt => <<'EONT_EONT');
 # main::STDOUT (FORMAT):
 # c  <1> leavewrite[1 ref] K/REFC,1 ->(end)