summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-11-15 10:50:59 -0600
committerJesse Luehrs <doy@tozt.net>2010-11-15 10:56:55 -0600
commitc53d2df2c524d9db9af996ac6543831c480b2092 (patch)
tree12e6f7e2a8f19655ab19161020e3fa8e4addfcc6 /t
parentc52f752e4094e5fd57f269a87ef252c56a328100 (diff)
downloadpackage-stash-xs-c53d2df2c524d9db9af996ac6543831c480b2092.tar.gz
package-stash-xs-c53d2df2c524d9db9af996ac6543831c480b2092.zip
convert the XS implementation to its own dist
Diffstat (limited to 't')
-rw-r--r--t/01-basic.t3
-rw-r--r--t/02-extension.t3
-rw-r--r--t/03-io.t1
-rw-r--r--t/04-get.t1
-rw-r--r--t/05-isa.t1
-rw-r--r--t/06-addsub.t3
-rwxr-xr-xt/07-edge-cases.t1
-rw-r--r--t/10-synopsis.t1
-rw-r--r--t/20-leaks.t1
-rw-r--r--t/21-leaks-debug.t1
-rw-r--r--t/lib/Package/Stash.pm19
11 files changed, 32 insertions, 3 deletions
diff --git a/t/01-basic.t b/t/01-basic.t
index 6b85515..79c72f1 100644
--- a/t/01-basic.t
+++ b/t/01-basic.t
@@ -1,6 +1,7 @@
+#!/usr/bin/env perl
use strict;
use warnings;
-
+use lib 't/lib';
use Test::More;
use Test::Fatal;
diff --git a/t/02-extension.t b/t/02-extension.t
index 5e88fa6..2096221 100644
--- a/t/02-extension.t
+++ b/t/02-extension.t
@@ -1,6 +1,7 @@
+#!/usr/bin/env perl
use strict;
use warnings;
-
+use lib 't/lib';
use Test::More;
use Test::Fatal;
diff --git a/t/03-io.t b/t/03-io.t
index e061cb2..ecade2a 100644
--- a/t/03-io.t
+++ b/t/03-io.t
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
+use lib 't/lib';
use Test::More;
use Test::Fatal;
diff --git a/t/04-get.t b/t/04-get.t
index 7205457..4f0eb6a 100644
--- a/t/04-get.t
+++ b/t/04-get.t
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
+use lib 't/lib';
use Test::More;
use Package::Stash;
diff --git a/t/05-isa.t b/t/05-isa.t
index d0f9b5a..ce852a6 100644
--- a/t/05-isa.t
+++ b/t/05-isa.t
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
+use lib 't/lib';
use Test::More;
use Package::Stash;
diff --git a/t/06-addsub.t b/t/06-addsub.t
index 1965afd..4889d59 100644
--- a/t/06-addsub.t
+++ b/t/06-addsub.t
@@ -1,6 +1,7 @@
+#!/usr/bin/env perl
use strict;
use warnings;
-
+use lib 't/lib';
use Test::More;
use Test::Fatal;
diff --git a/t/07-edge-cases.t b/t/07-edge-cases.t
index 2710c5c..17ec84c 100755
--- a/t/07-edge-cases.t
+++ b/t/07-edge-cases.t
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
+use lib 't/lib';
use Test::More;
use Package::Stash;
diff --git a/t/10-synopsis.t b/t/10-synopsis.t
index ecde8b6..9f59948 100644
--- a/t/10-synopsis.t
+++ b/t/10-synopsis.t
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
+use lib 't/lib';
use Test::More;
use Package::Stash;
diff --git a/t/20-leaks.t b/t/20-leaks.t
index d5dae8a..e97d7d6 100644
--- a/t/20-leaks.t
+++ b/t/20-leaks.t
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
+use lib 't/lib';
use Test::More;
use Test::Fatal;
use Test::Requires 'Test::LeakTrace';
diff --git a/t/21-leaks-debug.t b/t/21-leaks-debug.t
index 5b2a463..292a28c 100644
--- a/t/21-leaks-debug.t
+++ b/t/21-leaks-debug.t
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
+use lib 't/lib';
use Test::More;
use Test::Fatal;
use Test::Requires 'Test::LeakTrace';
diff --git a/t/lib/Package/Stash.pm b/t/lib/Package/Stash.pm
new file mode 100644
index 0000000..fb25135
--- /dev/null
+++ b/t/lib/Package/Stash.pm
@@ -0,0 +1,19 @@
+package # hide from PAUSE
+ Package::Stash;
+use strict;
+use warnings;
+
+use Package::Stash::XS;
+
+BEGIN {
+ my $ps = Package::Stash::XS->new(__PACKAGE__);
+ my $ps_xs = Package::Stash::XS->new('Package::Stash::XS');
+ for my $method (qw(new name namespace add_symbol remove_glob has_symbol
+ get_symbol get_or_add_symbol remove_symbol
+ list_all_symbols get_all_symbols)) {
+ my $sym = '&' . $method;
+ $ps->add_symbol($sym => $ps_xs->get_symbol($sym));
+ }
+}
+
+1;