summaryrefslogtreecommitdiff
path: root/t/op/stash.t
blob: 0cd7ebf5e7c20e348aede30244c4fbf1279b3cd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!./perl

BEGIN {
    chdir 't' if -d 't';
    @INC = qw(../lib);
}

require "./test.pl";

plan( tests => 2 );

# Used to segfault (bug #15479)
fresh_perl_is(
    '%:: = ""',
    'Odd number of elements in hash assignment at - line 1.',
    { switches => [ '-w' ] },
    'delete $::{STDERR} and print a warning',
);

# Used to segfault
fresh_perl_is(
    'BEGIN { $::{"X::"} = 2 }',
    '',
    { switches => [ '-w' ] },
    q(Insert a non-GV in a stash, under warnings 'once'),
);