Commit | Line | Data |
40aef9d6 |
1 | use warnings; |
2 | use strict; |
3 | |
726710b6 |
4 | use lib 't/lib'; |
53e92ec5 |
5 | use Test::More tests => 9; |
40aef9d6 |
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' ); |
53e92ec5 |
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' ); |