[svn:parrot] r41926 - trunk/t/steps/auto
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Sun Oct 18 14:21:04 UTC 2009
Author: jkeenan
Date: Sun Oct 18 14:21:03 2009
New Revision: 41926
URL: https://trac.parrot.org/parrot/changeset/41926
Log:
Add tests for previously untested branch.
Modified:
trunk/t/steps/auto/frames-01.t
Modified: trunk/t/steps/auto/frames-01.t
==============================================================================
--- trunk/t/steps/auto/frames-01.t Sun Oct 18 12:20:59 2009 (r41925)
+++ trunk/t/steps/auto/frames-01.t Sun Oct 18 14:21:03 2009 (r41926)
@@ -5,7 +5,7 @@
use strict;
use warnings;
-use Test::More tests => 23;
+use Test::More tests => 27;
use lib qw( lib t/configure/testlib );
use_ok('config::init::defaults');
use_ok('config::auto::frames');
@@ -102,7 +102,6 @@
my $rv;
$can_build_call_frames = 0;
-
$rv = $step->_handle_can_build_call_frames( $conf, $can_build_call_frames );
ok( $rv, "_handle_can_build_call_frames() returned true value" );
ok( ! $conf->data->get( 'cc_build_call_frames'),
@@ -114,6 +113,21 @@
$conf->data->set( 'cc_build_call_frames' => undef );
$conf->data->set( 'has_exec_protect' => undef );
+$can_build_call_frames = 1;
+my $realos = $conf->data->get( 'osname' );
+$conf->data->set( 'osname' => 'foobar' );
+$rv = $step->_handle_can_build_call_frames( $conf, $can_build_call_frames );
+ok( $rv, "_handle_can_build_call_frames() returned true value" );
+is( $conf->data->get( 'cc_build_call_frames'), '-DCAN_BUILD_CALL_FRAMES',
+ "cc_build_call_frames set to expected value" );
+is( $conf->data->get( 'has_exec_protect' ), 0,
+ "has_exec_protect is 0, as expected" );
+is( $step->result(), 'yes', "Result is 'yes', as expected" );
+
+$conf->data->set( 'cc_build_call_frames' => undef );
+$conf->data->set( 'has_exec_protect' => undef );
+$conf->data->set( 'osname' => $realos );
+
pass("Completed all tests in $0");
################### DOCUMENTATION ###################
More information about the parrot-commits
mailing list