Author: jkeenan
Date: Sat Jun 16 14:50:27 2007
New Revision: 19045
Modified:
branches/reconfigure/t/configure/101-init_manifest.t
Log:
Add unit tests for config/init/manifest.pm ('nomanifest' option).
Modified: branches/reconfigure/t/configure/101-init_manifest.t
==============================================================================
--- branches/reconfigure/t/configure/101-init_manifest.t (original)
+++ branches/reconfigure/t/configure/101-init_manifest.t Sat Jun 16
14:50:27 2007
@@ -5,12 +5,39 @@
use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More tests => 6;
use Carp;
use lib qw( . lib ../lib ../../lib );
use_ok('config::init::manifest');
+use Parrot::BuildUtil;
+use Parrot::Configure;
+use Parrot::Configure::Options qw( process_options );
+
+my $pkg = q{init::manifest};
+my $parrot_version = Parrot::BuildUtil::parrot_version();
+my $args = process_options( {
+ argv => [ q{--nomanicheck} ],
+ script => $0,
+ parrot_version => $parrot_version,
+ svnid => '$Id$',
+} );
+
+my $conf = Parrot::Configure->new;
+$conf->add_steps($pkg);
+$conf->options->set(%{$args});
+
+my $task = $conf->steps->[0];
+my $step_name = $task->step;
+my @step_params = @{ $task->params };
+
+my $step = $step_name->new();
+ok(defined $step, "$step_name constructor returned defined value");
+isa_ok($step, $step_name);
+ok($step->description(), "$step_name has description");
+my $ret = $step->runstep($conf);
+ok(defined $ret, "$step_name runstep() returned defined value");
-pass("Completed all tests in maketest.pl");
+pass("Completed all tests in $0");
################### DOCUMENTATION ###################