diff options
Diffstat (limited to 'ext/XS-APItest/t/clone-with-stack.t')
-rw-r--r-- | ext/XS-APItest/t/clone-with-stack.t | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/ext/XS-APItest/t/clone-with-stack.t b/ext/XS-APItest/t/clone-with-stack.t index 3f68c93377..179fba04a9 100644 --- a/ext/XS-APItest/t/clone-with-stack.t +++ b/ext/XS-APItest/t/clone-with-stack.t @@ -17,7 +17,7 @@ if (not $Config{'useithreads'}) { skip_all("clone_with_stack requires threads"); } -plan(5); +plan(6); fresh_perl_is( <<'----', <<'====', undef, "minimal clone_with_stack" ); use XS::APItest; @@ -78,3 +78,26 @@ f(); ==== } + +{ + fresh_perl_is( <<'----', <<'====', undef, "with localised stuff" ); +use XS::APItest; +$s = "outer"; +$a[0] = "anterior"; +$h{k} = "hale"; +{ + local $s = "inner"; + local $a[0] = 'posterior'; + local $h{k} = "halt"; + clone_with_stack(); +} +print "scl: $s\n"; +print "ary: $a[0]\n"; +print "hsh: $h{k}\n"; +---- +scl: outer +ary: anterior +hsh: hale +==== + +} |