[svn:parrot] r37151 - trunk/t/steps
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Sat Mar 7 01:12:14 UTC 2009
Author: jkeenan
Date: Sat Mar 7 01:12:13 2009
New Revision: 37151
URL: https://trac.parrot.org/parrot/changeset/37151
Log:
Mock an HPUX special case.
Modified:
trunk/t/steps/auto_alignptrs-01.t
Modified: trunk/t/steps/auto_alignptrs-01.t
==============================================================================
--- trunk/t/steps/auto_alignptrs-01.t Sat Mar 7 00:54:44 2009 (r37150)
+++ trunk/t/steps/auto_alignptrs-01.t Sat Mar 7 01:12:13 2009 (r37151)
@@ -5,7 +5,7 @@
use strict;
use warnings;
-use Test::More tests => 17;
+use Test::More tests => 22;
use Carp;
use lib qw( lib t/configure/testlib );
use_ok('config::init::defaults');
@@ -63,6 +63,34 @@
ok( $ret, "runstep() returned true value" );
is($step->result(), qq{configured: $align bytes}, "Expected result was set");
+$conf->replenish($serialized);
+
+########## mock an HPUX special case ##########
+
+($args, $step_list_ref) = process_options(
+ {
+ argv => [ ],
+ mode => q{configure},
+ }
+);
+
+$conf->add_steps($pkg);
+$conf->options->set( %{$args} );
+$step = test_step_constructor_and_description($conf);
+
+my $orig_OSNAME = $conf->data->get_p5('OSNAME');
+my $orig_ccflags = $conf->data->get_p5('ccflags');
+
+$conf->data->set_p5('OSNAME' => 'hpux');
+$conf->data->set_p5('ccflags' => '');
+$ret = $step->runstep($conf);
+ok( $ret, "runstep() returned true value" );
+like($step->result(), qr/^for hpux:/, "Expected result was set");
+
+# restore prior to subsequent tests
+$conf->data->set_p5('OSNAME' => $orig_OSNAME);
+$conf->data->set_p5('ccflags' => $orig_ccflags);
+
pass("Completed all tests in $0");
################### DOCUMENTATION ###################
More information about the parrot-commits
mailing list