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