fix codetest failure - ASSERT_ARGS does not have a ; after and
[parrot.git] / t / steps / auto / backtrace-01.t
blob3b1d6bc135a7f00aab10b7ef8f6cd8e29533cadd
1 #! perl
2 # Copyright (C) 2007, Parrot Foundation.
3 # $Id$
4 # auto/backtrace-01.t
6 use strict;
7 use warnings;
8 use Test::More tests => 14;
9 use Carp;
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( {
21     argv            => [],
22     mode            => q{configure},
23 } );
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");
49 $error = q{};
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 ###################
62 =head1 NAME
64 auto/backtrace-01.t - test auto::backtrace
66 =head1 SYNOPSIS
68     % prove t/steps/auto/backtrace-01.t
70 =head1 DESCRIPTION
72 The files in this directory test functionality used by F<Configure.pl>.
74 The tests in this file test auto::backtrace.
76 =head1 AUTHOR
78 James E Keenan
80 =head1 SEE ALSO
82 config::auto::backtrace, F<Configure.pl>.
84 =cut
86 # Local Variables:
87 #   mode: cperl
88 #   cperl-indent-level: 4
89 #   fill-column: 100
90 # End:
91 # vim: expandtab shiftwidth=4: