Re: [Module::Build] ruthrough.t doesn't skip test when YAML not installed (patch included)
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2003-10-10 20:44:46
|
Hi Stephen,
Thanks, I've fixed it in CVS. I meant check_installed_version(), not
check_installed_status().
-Ken
On Thursday, October 2, 2003, at 08:43 AM, Stephen J. Smith wrote:
> Line 61 of runthrough.t calls check_installed_status() and checks for a
> true result. check_installed_status() returns a hash which always
> evaluates to true.
>
> Maybe this hasn't been caught because t/Sample/META.yml is part of the
> distribution? Maybe the test code should unlink() it before invoking
> distdir?
>
> The below patch uses the same check that Base.pm uses for a similar
> purpose. There are other approaches of course.
>
> diff -uNr Module-Build-0.20.orig/t/runthrough.t
> Module-Build-0.20/t/runthrough.t
> --- Module-Build-0.20.orig/t/runthrough.t 2003-08-26
> 14:49:15.000000000 -0400
> +++ Module-Build-0.20/t/runthrough.t 2003-10-02 09:18:45.000000000
> -0400
> @@ -58,7 +58,7 @@
> print $output;
> print "^^^^^^^^^^^^^^^^^^^^^ Sample/test.pl output
> ^^^^^^^^^^^^^^^^^^^^^\n";
>
> -if ($build->check_installed_status('YAML', 0)) {
> +if (eval {require YAML; 1}) {
> eval {$build->dispatch('disttest')};
> ok $@, '';
>
> End of Patch.
>
>
>
>
|