This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Test::Simple 0.60
[perl5.git] / lib / Test / Simple / t / require_ok.t
CommitLineData
7483b81c
RGS
1#!/usr/bin/perl -w
2
3BEGIN {
4 if( $ENV{PERL_CORE} ) {
5 chdir 't';
6 @INC = ('../lib', 'lib');
7 }
8 else {
9 unshift @INC, 't/lib';
10 }
11}
12
13use strict;
5143c659 14use Test::More tests => 8;
7483b81c
RGS
15
16# Symbol and Class::Struct are both non-XS core modules back to 5.004.
17# So they'll always be there.
18require_ok("Symbol");
19ok( $INC{'Symbol.pm'}, "require_ok MODULE" );
20
21require_ok("Class/Struct.pm");
22ok( $INC{'Class/Struct.pm'}, "require_ok FILE" );
23
24# Its more trouble than its worth to try to create these filepaths to test
25# through require_ok() so we cheat and use the internal logic.
26ok !Test::More::_is_module_name('foo:bar');
27ok !Test::More::_is_module_name('foo/bar.thing');
28ok !Test::More::_is_module_name('Foo::Bar::');
5143c659 29ok Test::More::_is_module_name('V');