Author: jkeenan Date: Tue Apr 17 19:51:39 2007 New Revision: 18275 Modified: trunk/t/configure/01-options.t trunk/t/configure/02-messages.t trunk/t/configure/03-steplist.t
Log: Applying patch to t/configure/01-options.t supplied by Steve Peters in http://rt.perl.org/rt3/Ticket/Display.html?id=42585. Deal with possibility of more than one 'parrot/' directory in your path. Augment two error messages with $!. Steve's patch similarly applied to 02-messages.t and 03-steplist.t. Modified: trunk/t/configure/01-options.t ============================================================================== --- trunk/t/configure/01-options.t (original) +++ trunk/t/configure/01-options.t Tue Apr 17 19:51:39 2007 @@ -9,7 +9,7 @@ BEGIN { use FindBin qw($Bin); use Cwd qw(cwd realpath); - realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$}; + realpath($Bin) =~ m{^(.*\/parrot)\/.*$}; our $topdir = $1; if ( defined $topdir ) { print "\nOK: Parrot top directory located\n"; @@ -43,13 +43,13 @@ ok( !defined $valid{$badoption}, "invalid option not found" ); open my $FH, '<', "$main::topdir/Configure.pl" - or croak "Unable to open handle to Configure.pl"; + or croak "Unable to open handle to $main::topdir/Configure.pl: $!"; my $bigstr; { local $/ = undef; $bigstr = <$FH>; } -close $FH or croak "Unable to close handle to Configure.pl"; +close $FH or croak "Unable to close handle to Configure.pl: $!"; # Ignore any POD I have moved to an __END__ block. $bigstr =~ s/__END__.*//s; Modified: trunk/t/configure/02-messages.t ============================================================================== --- trunk/t/configure/02-messages.t (original) +++ trunk/t/configure/02-messages.t Tue Apr 17 19:51:39 2007 @@ -9,7 +9,7 @@ BEGIN { use FindBin qw($Bin); use Cwd qw(cwd realpath); - realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$}; + realpath($Bin) =~ m{^(.*\/parrot)\/.*$}; our $topdir = $1; if ( defined $topdir ) { print "\nOK: Parrot top directory located\n"; Modified: trunk/t/configure/03-steplist.t ============================================================================== --- trunk/t/configure/03-steplist.t (original) +++ trunk/t/configure/03-steplist.t Tue Apr 17 19:51:39 2007 @@ -9,7 +9,7 @@ BEGIN { use FindBin qw($Bin); use Cwd qw(cwd realpath); - realpath($Bin) =~ m{^(.*\/parrot)\/[^/]*\/[^/]*\/[^/]*$}; + realpath($Bin) =~ m{^(.*\/parrot)\/.*$}; our $topdir = $1; if ( defined $topdir ) { print "\nOK: Parrot top directory located\n"; @@ -19,7 +19,7 @@ } unshift @INC, qq{$topdir/lib}; } -use Test::More qw(no_plan); # tests => 10; +use Test::More tests => 4; use Carp; use_ok('Parrot::Configure::Step::List', qw| get_steps_list
