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