Get tests running under -T (cosmetics only)
[p5sagit/namespace-clean.git] / t / 04-except.t
1 use warnings;
2 use strict;
3
4 use lib 't/lib';
5 use Test::More tests => 6;
6
7 {   package ExceptWithArray;
8     use ExporterTest qw( foo bar qux );
9     use namespace::clean -except => [qw( foo bar )];
10 }
11 ok( ExceptWithArray->can('foo'),    'first of except list still there');
12 ok( ExceptWithArray->can('bar'),    'second of except list still there');
13 ok(!ExceptWithArray->can('qux'),    'item not in except list was removed');
14
15 {   package ExceptWithSingle;
16     use ExporterTest qw( foo bar qux );
17     use namespace::clean -except => 'qux';
18 }
19 ok(!ExceptWithSingle->can('foo'),   'first item not in except still there');
20 ok(!ExceptWithSingle->can('bar'),   'second item not in except still there');
21 ok( ExceptWithSingle->can('qux'),   'except item was removed');
22
23