2 # Copyright (C) 2007, Parrot Foundation.
8 use Test::More tests => 14;
10 use lib qw( lib t/configure/testlib );
11 use_ok('config::auto::backtrace');
12 use Parrot::Configure::Options qw( process_options );
13 use Parrot::Configure::Step::Test;
14 use Parrot::Configure::Test qw(
15 test_step_constructor_and_description
18 ########## regular ##########
20 my ($args, $step_list_ref) = process_options( {
25 my $conf = Parrot::Configure::Step::Test->new;
26 $conf->include_config_results( $args );
28 my ($task, $step_name, $step, $ret);
29 my $pkg = q{auto::backtrace};
31 $conf->add_steps($pkg);
33 my $serialized = $conf->pcfreeze();
35 $conf->options->set(%{$args});
36 $step = test_step_constructor_and_description($conf);
38 $conf->replenish($serialized);
40 ########## _evaluate_backtrace() ##########
42 $conf->options->set(%{$args});
43 $step = test_step_constructor_and_description($conf);
44 my $error = q{mock_error};
45 ok($step->_evaluate_backtrace($conf, $error),
46 "_evaluate_backtrace returned true value");
47 is($step->result, 'no', "Got expected result");
50 ok($step->_evaluate_backtrace($conf, $error),
51 "_evaluate_backtrace returned true value");
52 is($step->result, 'yes', "Got expected result");
53 ok($conf->data->get('backtrace'),
54 "backtrace set as expected");
56 ok($step->runstep($conf), "runstep() returned true value");
58 pass("Completed all tests in $0");
60 ################### DOCUMENTATION ###################
64 auto/backtrace-01.t - test auto::backtrace
68 % prove t/steps/auto/backtrace-01.t
72 The files in this directory test functionality used by F<Configure.pl>.
74 The tests in this file test auto::backtrace.
82 config::auto::backtrace, F<Configure.pl>.
88 # cperl-indent-level: 4
91 # vim: expandtab shiftwidth=4: