Commit | Line | Data |
7483b81c |
1 | #!/usr/bin/perl -w |
ccbd73a4 |
2 | # $Id: /mirror/googlecode/test-more/t/require_ok.t 57943 2008-08-18T02:09:22.275428Z brooklyn.kid51 $ |
7483b81c |
3 | |
4 | BEGIN { |
5 | if( $ENV{PERL_CORE} ) { |
6 | chdir 't'; |
7 | @INC = ('../lib', 'lib'); |
8 | } |
9 | else { |
10 | unshift @INC, 't/lib'; |
11 | } |
12 | } |
13 | |
14 | use strict; |
5143c659 |
15 | use Test::More tests => 8; |
7483b81c |
16 | |
17 | # Symbol and Class::Struct are both non-XS core modules back to 5.004. |
18 | # So they'll always be there. |
19 | require_ok("Symbol"); |
20 | ok( $INC{'Symbol.pm'}, "require_ok MODULE" ); |
21 | |
22 | require_ok("Class/Struct.pm"); |
23 | ok( $INC{'Class/Struct.pm'}, "require_ok FILE" ); |
24 | |
25 | # Its more trouble than its worth to try to create these filepaths to test |
26 | # through require_ok() so we cheat and use the internal logic. |
27 | ok !Test::More::_is_module_name('foo:bar'); |
28 | ok !Test::More::_is_module_name('foo/bar.thing'); |
29 | ok !Test::More::_is_module_name('Foo::Bar::'); |
5143c659 |
30 | ok Test::More::_is_module_name('V'); |