2 # Copyright (C) 2008, Parrot Foundation.
8 use Test::More tests => 8;
11 use_ok('config::gen::crypto');
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(
27 my $conf = Parrot::Configure::Step::Test->new;
28 $conf->include_config_results( $args );
30 my $serialized = $conf->pcfreeze();
32 my $pkg = q{gen::crypto};
33 $conf->add_steps($pkg);
34 $conf->options->set( %{$args} );
35 my $step = test_step_constructor_and_description($conf);
37 ok(-f $step->{digest_pmc_template}, "Able to locate source code file");
39 my $has_crypto_orig = $conf->data->get('has_crypto');
40 $conf->data->set( has_crypto => undef );
41 my $ret = $step->runstep($conf);
42 ok( $ret, "runstep() returned true value" );
43 is($step->result(), q{skipped}, "Got expected result");
44 # re-set for next test
45 $conf->data->set( has_crypto => $has_crypto_orig );
46 $step->set_result( q{} );
48 $conf->replenish($serialized);
50 pass("Completed all tests in $0");
52 ################### DOCUMENTATION ###################
56 gen/crypto-01.t - test gen::crypto
60 % prove t/steps/gen/crypto-01.t
64 The files in this directory test functionality used by F<Configure.pl>.
66 The tests in this file test gen::crypto.
74 config::gen::crypto, F<Configure.pl>.
80 # cperl-indent-level: 4
83 # vim: expandtab shiftwidth=4: