Debian Codegraph @

ext/XS-APItest/t/temp_lv_sub.t

raw
1 #!perl -w
2
3 use strict;
4 use utf8;
5 use Test::More tests => 5;
6
7 require_ok('XS::APItest');
8
9 sub make_temp_mg_lv :lvalue { XS::APItest::TempLv::make_temp_mg_lv($_[0]); }
10
11 {
12 my $x = "[]";
13 eval { XS::APItest::TempLv::make_temp_mg_lv($x) = "a"; };
14 is($@, '', 'temp mg lv from xs exception check');
15 is($x, '[a]', 'temp mg lv from xs success');
16 }
17
18 {
19 my $x = "{}";
20 eval { make_temp_mg_lv($x) = "b"; };
21 is($@, '', 'temp mg lv from pp exception check');
22 is($x, '{b}', 'temp mg lv from pp success');
23 }
24
25 1;