summaryrefslogtreecommitdiffstats
path: root/t/paamayim_nekdotayim.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-09-05 20:03:04 -0500
committerJesse Luehrs <doy@tozt.net>2011-09-05 20:05:28 -0500
commitd0d52465c46f70ad17b14a90db6e5e5eb557b591 (patch)
tree6f1e5602e538cfda5b3c08a7cf1d8f00b76738be /t/paamayim_nekdotayim.t
parentd62ef9096ad729b407a644bc2f97717ecc6889ea (diff)
downloadpackage-stash-xs-d0d52465c46f70ad17b14a90db6e5e5eb557b591.tar.gz
package-stash-xs-d0d52465c46f70ad17b14a90db6e5e5eb557b591.zip
sync tests
Diffstat (limited to 't/paamayim_nekdotayim.t')
-rw-r--r--t/paamayim_nekdotayim.t28
1 files changed, 28 insertions, 0 deletions
diff --git a/t/paamayim_nekdotayim.t b/t/paamayim_nekdotayim.t
new file mode 100644
index 0000000..d17bdaf
--- /dev/null
+++ b/t/paamayim_nekdotayim.t
@@ -0,0 +1,28 @@
+#!/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 ::"
+);
+like(
+ exception { $stash->get_or_add_symbol('@bar::baz') },
+ qr/^Variable names may not contain ::/,
+ "can't add symbol with ::"
+);
+
+done_testing;