Test::Simple/More/Builder/Tutorial 0.41
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / use_ok.t
CommitLineData
33459055 1BEGIN {
a9153838 2 if( $ENV{PERL_CORE} ) {
3 chdir 't';
4 @INC = '../lib';
5 }
33459055 6}
7
8use Test::More tests => 7;
9
10# Using Symbol because it's core and exports lots of stuff.
11{
12 package Foo::one;
13 ::use_ok("Symbol");
14 ::ok( defined &gensym, 'use_ok() no args exports defaults' );
15}
16
17{
18 package Foo::two;
19 ::use_ok("Symbol", qw(qualify));
20 ::ok( !defined &gensym, ' one arg, defaults overriden' );
21 ::ok( defined &qualify, ' right function exported' );
22}
23
24{
25 package Foo::three;
26 ::use_ok("Symbol", qw(gensym ungensym));
27 ::ok( defined &gensym && defined &ungensym, ' multiple args' );
28}