4 if( $ENV{PERL_CORE} ) {
10 use Test::More tests => 33;
16 ok( !Internals::SvREADONLY $foo );
17 ok( Internals::SvREADONLY $foo, 1 );
18 ok( Internals::SvREADONLY $foo );
19 ok( !Internals::SvREADONLY $foo, 0 );
20 ok( !Internals::SvREADONLY $foo );
22 ok( !Internals::SvREADONLY @foo );
23 ok( Internals::SvREADONLY @foo, 1 );
24 ok( Internals::SvREADONLY @foo );
25 ok( !Internals::SvREADONLY @foo, 0 );
26 ok( !Internals::SvREADONLY @foo );
28 ok( !Internals::SvREADONLY $foo[2] );
29 ok( Internals::SvREADONLY $foo[2], 1 );
30 ok( Internals::SvREADONLY $foo[2] );
31 ok( !Internals::SvREADONLY $foo[2], 0 );
32 ok( !Internals::SvREADONLY $foo[2] );
34 ok( !Internals::SvREADONLY %foo );
35 ok( Internals::SvREADONLY %foo, 1 );
36 ok( Internals::SvREADONLY %foo );
37 ok( !Internals::SvREADONLY %foo, 0 );
38 ok( !Internals::SvREADONLY %foo );
40 ok( !Internals::SvREADONLY $foo{foo} );
41 ok( Internals::SvREADONLY $foo{foo}, 1 );
42 ok( Internals::SvREADONLY $foo{foo} );
43 ok( !Internals::SvREADONLY $foo{foo}, 0 );
44 ok( !Internals::SvREADONLY $foo{foo} );
46 is( Internals::SvREFCNT($foo), 1 );
49 is( Internals::SvREFCNT($foo), 2 );
50 is( Internals::SvREFCNT($bar), 1 );
52 is( Internals::SvREFCNT($foo), 1 );
54 is( Internals::SvREFCNT(@foo), 1 );
55 is( Internals::SvREFCNT($foo[2]), 1 );
56 is( Internals::SvREFCNT(%foo), 1 );
57 is( Internals::SvREFCNT($foo{foo}), 1 );