[Module-build-checkins] Module-Build/t common.pl,1.11,1.12
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <kwi...@us...> - 2005-04-12 20:10:14
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29018/t Modified Files: common.pl Log Message: Push t/lib/ onto @INC here Index: common.pl =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/common.pl,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- common.pl 14 Nov 2004 11:31:28 -0000 1.11 +++ common.pl 12 Apr 2005 20:09:42 -0000 1.12 @@ -1,6 +1,16 @@ use strict; use Config; +# In case the test wants to use Test::More or our other bundled +# modules, make sure they can be loaded. They'll still do "use +# Test::More" in the test script. +BEGIN { + my $t_lib = File::Spec->catdir('t', 'lib'); + push @INC, $t_lib; # Let user's installed version override +} + +use Test(); + sub have_module { my $module = shift; return eval "use $module; 1"; @@ -19,7 +29,7 @@ sub skip_subtest { my $msg = @_ ? shift() : '(no reason given)'; - skip "skip $msg", 1; + Test::skip "skip $msg", 1; } sub save_handle { |