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