1use strict;
2use warnings;
3use lib 't/lib';
4use Test::More;
5use Test::Fatal;
6
7use Package::Stash;
8
9my $stash = Package::Stash->new('Foo');
10# this segfaulted on the xs version
11like(
12    exception { $stash->add_symbol('@bar::baz') },
13    qr/^Variable names may not contain ::/,
14    "can't add symbol with ::"
15);
16like(
17    exception { $stash->get_symbol('@bar::baz') },
18    qr/^Variable names may not contain ::/,
19    "can't add symbol with ::"
20);
21like(
22    exception { $stash->get_or_add_symbol('@bar::baz') },
23    qr/^Variable names may not contain ::/,
24    "can't add symbol with ::"
25);
26
27done_testing;
28