[svn:parrot] r44530 - branches/rm_cflags/t/steps/auto
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Sat Feb 27 02:38:21 UTC 2010
Author: jkeenan
Date: Sat Feb 27 02:38:18 2010
New Revision: 44530
URL: https://trac.parrot.org/parrot/changeset/44530
Log:
Add test to simulate case where --cage option is specified.
Modified:
branches/rm_cflags/t/steps/auto/warnings-01.t
Modified: branches/rm_cflags/t/steps/auto/warnings-01.t
==============================================================================
--- branches/rm_cflags/t/steps/auto/warnings-01.t Sat Feb 27 02:07:02 2010 (r44529)
+++ branches/rm_cflags/t/steps/auto/warnings-01.t Sat Feb 27 02:38:18 2010 (r44530)
@@ -31,16 +31,15 @@
$conf->add_steps($pkg);
my $serialized = $conf->pcfreeze();
+my $step;
-$conf->options->set( %{$args} );
SKIP: {
skip 'Tests not yet passing on Sun/Solaris',
23
if $^O =~ m/sun|solaris/i;
-my $step = test_step_constructor_and_description($conf);
-
# Simulate the case where C compiler is not gcc.
+$conf->options->set( %{$args} );
$step = test_step_constructor_and_description($conf);
$conf->data->set( gccversion => undef );
ok($step->runstep($conf), "runstep() returned true value");
@@ -66,6 +65,21 @@
"Got expected verbose output: compiler with warnings not yet supported" );
}
+$step->set_result( undef );
+$conf->replenish($serialized);
+
+# Simulate case where --cage warnings are requested
+$conf->options->set( verbose => undef );
+$step = test_step_constructor_and_description($conf);
+$conf->data->set( gccversion => 'defined' );
+$conf->data->set( 'g++' => undef );
+$conf->options->set( cage => 1 );
+ok($step->runstep($conf), "runstep() returned true value");
+like($conf->data->get( 'ccwarn' ),
+ qr/-std=c89/,
+ "'cage' warning set as expected"
+);
+
} # End SKIP block for Sun/Solaris
$conf->cc_clean();
More information about the parrot-commits
mailing list