On Saturday 05 April 2008 07:49:25 [EMAIL PROTECTED] wrote:

> Log:
> Create test of case where directory structure needed for Macports is
> located.
>
> /branches/ports/t/steps/auto_ports-02.t)
> ===========================================================================
>=== --- /branches/ports/t/steps/auto_ports-02.t        (original)
> +++ branches/ports/t/steps/auto_ports-03.t    Sat Apr  5 07:49:24 2008
> @@ -39,10 +39,26 @@
>  isa_ok($step, $step_name);
>  ok($step->description(), "$step_name has description");
>
> -# mock no Macports-default directories
> -$step->{ports_root} = File::Spec->catdir( qw( / my ridiculous foobar ) );
> -ok(! defined $step->runstep($conf), "runstep() returned undefined value");
> -is($step->result(), 'failed', "Got expected result");
> +my $cwd = cwd();
> +{
> +    my $tdir = tempdir( CLEANUP => 1 );
> +    $step->{ports_root} = $tdir;
> +    ok(chdir $tdir, "Able to change to temporary directory");
> +    ok( (mkdir 'lib'), "Able to make lib directory");
> +    ok( (mkdir 'include'), "Able to make include directory");

Are chdir() and mkdir() really worth testing?  If they fail, what have we 
learned about Parrot or its configuration system?

-- c

Reply via email to