summaryrefslogtreecommitdiffstats
path: root/t/paamayim_nekdotayim.t
blob: 2096cb4065f54d965151301f52c0fbbee7e69615 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env perl
use strict;
use warnings;
use lib 't/lib';
use Test::More;
use Test::Fatal;

use Package::Stash;

my $stash = Package::Stash->new('Foo');
# this segfaulted on the xs version
like(
    exception { $stash->add_symbol('@bar::baz') },
    qr/^Variable names may not contain ::/,
    "can't add symbol with ::"
);
like(
    exception { $stash->get_symbol('@bar::baz') },
    qr/^Variable names may not contain ::/,
    "can't add symbol with ::"
);

done_testing;