tagged release 0.6.4
[parrot.git] / t / steps / auto_jit-01.t
blob4155f6a411bd0402adef1f8c78a64c74ad738a67
1 #! perl
2 # Copyright (C) 2007, The Perl Foundation.
3 # $Id$
4 # auto_jit-01.t
6 use strict;
7 use warnings;
8 use Test::More tests =>  12;
9 use Carp;
10 use lib qw( lib t/configure/testlib );
11 use_ok('config::init::defaults');
12 use_ok('config::auto::jit');
13 use Parrot::Configure;
14 use Parrot::Configure::Options qw( process_options );
15 use Parrot::Configure::Test qw( test_step_thru_runstep);
17 my $args = process_options(
18     {
19         argv => [ q{--miniparrot} ],
20         mode => q{configure},
21     }
24 my $conf = Parrot::Configure->new;
26 test_step_thru_runstep( $conf, q{init::defaults}, $args );
28 my $pkg = q{auto::jit};
30 $conf->add_steps($pkg);
31 $conf->options->set( %{$args} );
33 my ( $task, $step_name, $step);
34 $task        = $conf->steps->[-1];
35 $step_name   = $task->step;
37 $step = $step_name->new();
38 ok( defined $step, "$step_name constructor returned defined value" );
39 isa_ok( $step, $step_name );
40 ok( $step->description(), "$step_name has description" );
42 my $ret = $step->runstep($conf);
43 ok( $ret, "$step_name runstep() returned true value" );
44 is($step->result(), q{skipped}, "Expected result was set");
47 pass("Completed all tests in $0");
49 ################### DOCUMENTATION ###################
51 =head1 NAME
53 auto_jit-01.t - test config::auto::jit
55 =head1 SYNOPSIS
57     % prove t/steps/auto_jit-01.t
59 =head1 DESCRIPTION
61 The files in this directory test functionality used by F<Configure.pl>.
63 The tests in this file tests config::auto::jit with the C<--miniparrot>
64 option.
66 =head1 AUTHOR
68 James E Keenan
70 =head1 SEE ALSO
72 config::auto::jit, F<Configure.pl>.
74 =cut
76 # Local Variables:
77 #   mode: cperl
78 #   cperl-indent-level: 4
79 #   fill-column: 100
80 # End:
81 # vim: expandtab shiftwidth=4: