[Module-build-checkins] Module-Build/t xs.t,1.25,1.26
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <kwi...@us...> - 2005-09-23 02:27:02
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7894/t Modified Files: xs.t Log Message: Make sure the new module actually works Index: xs.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- xs.t 29 Jun 2005 08:27:07 -0000 1.25 +++ xs.t 23 Sep 2005 02:26:55 -0000 1.26 @@ -26,7 +26,7 @@ } elsif ( !$have_c_compiler ) { plan skip_all => 'C_support enabled, but no compiler found'; } else { - plan tests => 11; + plan tests => 14; } } @@ -52,6 +52,18 @@ ok ! $@; { + # Make sure it actually works + eval 'use blib; require ' . $dist->name; + is $@, ''; + + my $sub = $dist->name->can('ok'); + ok $sub, "ok() function should be defined"; + + my $val = $sub->(); + is $val, 'ok', "The ok() function should return the string 'ok'"; +} + +{ # Try again in a subprocess eval {$mb->dispatch('clean')}; ok ! $@; |