X-Git-Url: http://git.maemo.org/git/?p=dh-make-perl;a=blobdiff_plain;f=dev%2Fi386%2Flibtest-simple-perl%2Flibtest-simple-perl-0.80%2Ft%2Frequire_ok.t;fp=dev%2Fi386%2Flibtest-simple-perl%2Flibtest-simple-perl-0.80%2Ft%2Frequire_ok.t;h=463a007599c356bfec33d3ee3545615d4496f538;hp=0000000000000000000000000000000000000000;hb=8977e561d8a9eae6959218b0306c9df2056a38a9;hpb=df794b845212301ea0d267c919232538bfef356a diff --git a/dev/i386/libtest-simple-perl/libtest-simple-perl-0.80/t/require_ok.t b/dev/i386/libtest-simple-perl/libtest-simple-perl-0.80/t/require_ok.t new file mode 100644 index 0000000..463a007 --- /dev/null +++ b/dev/i386/libtest-simple-perl/libtest-simple-perl-0.80/t/require_ok.t @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w + +BEGIN { + if( $ENV{PERL_CORE} ) { + chdir 't'; + @INC = ('../lib', 'lib'); + } + else { + unshift @INC, 't/lib'; + } +} + +use strict; +use Test::More tests => 8; + +# Symbol and Class::Struct are both non-XS core modules back to 5.004. +# So they'll always be there. +require_ok("Symbol"); +ok( $INC{'Symbol.pm'}, "require_ok MODULE" ); + +require_ok("Class/Struct.pm"); +ok( $INC{'Class/Struct.pm'}, "require_ok FILE" ); + +# Its more trouble than its worth to try to create these filepaths to test +# through require_ok() so we cheat and use the internal logic. +ok !Test::More::_is_module_name('foo:bar'); +ok !Test::More::_is_module_name('foo/bar.thing'); +ok !Test::More::_is_module_name('Foo::Bar::'); +ok Test::More::_is_module_name('V');