drop Package::Stash dependency
[p5sagit/namespace-clean.git] / t / 01-function-wipeout.t
1 use warnings;
2 use strict;
3
4 use lib 't/lib';
5 use Test::More tests => 9;
6
7 use_ok('FunctionWipeout');
8 ok( !FunctionWipeout->can('foo'),
9     'imported function removed' );
10 ok( !FunctionWipeout->can('bar'),
11     'previously declared function removed' );
12 ok( FunctionWipeout->can('baz'),
13     'later declared function still exists' );
14 is( FunctionWipeout->baz, 23,
15     'removed functions still bound' );
16 ok( FunctionWipeout->can('qux'),
17     '-except flag keeps import' );
18 is( FunctionWipeout->qux, 17,
19     'kept import still works' );
20 ok( $FunctionWipeout::foo,
21     'non-code symbol was not removed' );
22 is( $FunctionWipeout::foo, 777,
23     'non-code symbol still has correct value' );