tagged release 0.6.4
[parrot.git] / t / steps / inter_encoding-01.t
blobb24da69c5b90f06d769818d2e2c001ba1cb208d8
1 #! perl
2 # Copyright (C) 2007, The Perl Foundation.
3 # $Id$
4 # inter_encoding-01.t
6 use strict;
7 use warnings;
8 use Test::More tests => 11;
9 use Carp;
10 use lib qw( lib t/configure/testlib );
11 use_ok('config::init::defaults');
12 use_ok('config::inter::encoding');
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 => [],
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{inter::encoding};
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" );
43     open STDOUT, '>', "/dev/null" or croak "Unable to open to myout";
44     my $ret = $step->runstep($conf);
45     close STDOUT or croak "Unable to close after myout";
46     ok( $ret, "$step_name runstep() returned true value" );
49 pass("Completed all tests in $0");
51 ################### DOCUMENTATION ###################
53 =head1 NAME
55 inter_encoding-01.t - test config::inter::encoding
57 =head1 SYNOPSIS
59     % prove t/steps/inter_encoding-01.t
61 =head1 DESCRIPTION
63 The files in this directory test functionality used by F<Configure.pl>.
65 The tests in this file test subroutines exported by config::inter::encoding.
67 =head1 AUTHOR
69 James E Keenan
71 =head1 SEE ALSO
73 config::inter::encoding, F<Configure.pl>.
75 =cut
77 # Local Variables:
78 #   mode: cperl
79 #   cperl-indent-level: 4
80 #   fill-column: 100
81 # End:
82 # vim: expandtab shiftwidth=4: