summaryrefslogtreecommitdiff
path: root/cpan/Test-Simple/t/Test-Stream-PackageUtil.t
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/Test-Simple/t/Test-Stream-PackageUtil.t')
-rw-r--r--cpan/Test-Simple/t/Test-Stream-PackageUtil.t38
1 files changed, 0 insertions, 38 deletions
diff --git a/cpan/Test-Simple/t/Test-Stream-PackageUtil.t b/cpan/Test-Simple/t/Test-Stream-PackageUtil.t
deleted file mode 100644
index 76d80d87ed..0000000000
--- a/cpan/Test-Simple/t/Test-Stream-PackageUtil.t
+++ /dev/null
@@ -1,38 +0,0 @@
-use strict;
-use warnings;
-
-use Test::Stream;
-use Test::More;
-
-use ok 'Test::Stream::PackageUtil';
-
-can_ok(__PACKAGE__, qw/package_sym package_purge_sym/);
-
-my $ok = package_sym(__PACKAGE__, CODE => 'ok');
-is($ok, \&ok, "package sym gave us the code symbol");
-
-my $todo = package_sym(__PACKAGE__, SCALAR => 'TODO');
-is($todo, \$TODO, "got the TODO scalar");
-
-our $foo = 'foo';
-our @foo = ('f', 'o', 'o');
-our %foo = (f => 'oo');
-sub foo { 'foo' };
-
-is(foo(), 'foo', "foo() is defined");
-is($foo, 'foo', '$foo is defined');
-is_deeply(\@foo, [ 'f', 'o', 'o' ], '@foo is defined');
-is_deeply(\%foo, { f => 'oo' }, '%foo is defined');
-
-package_purge_sym(__PACKAGE__, CODE => 'foo');
-
-is($foo, 'foo', '$foo is still defined');
-is_deeply(\@foo, [ 'f', 'o', 'o' ], '@foo is still defined');
-is_deeply(\%foo, { f => 'oo' }, '%foo is still defined');
-my $r = eval { __PACKAGE__->foo() };
-my $e = $@;
-ok(!$r, "Failed to call foo()");
-like($e, qr/Can't locate object method "foo" via package "main"/, "foo() is not defined anymore");
-ok(!__PACKAGE__->can('foo'), "can() no longer thinks we can do foo()");
-
-done_testing;