2 # Copyright (C) 2009, Parrot Foundation.
4 # init/hints/linux-01.t
9 use File::Temp qw( tempdir );
11 plan( skip_all => 'only needs testing on Linux' ) unless $^O =~ /linux/i;
14 use lib qw( lib t/configure/testlib );
15 use_ok('config::init::hints');
16 use_ok('config::init::hints::linux');
17 use Parrot::Configure::Options qw( process_options );
18 use Parrot::Configure::Step::Test;
19 use Parrot::Configure::Test qw(
20 test_step_constructor_and_description
22 use IO::CaptureOutput qw | capture |;
25 my ($args, $step_list_ref) = process_options(
32 my $conf = Parrot::Configure::Step::Test->new;
33 $conf->include_config_results( $args );
35 ##### Tests of some internal subroutines #####
37 ##### _handle_icc_ccflags() #####
40 $ccflags = init::hints::linux::_handle_icc_ccflags($conf, $ccflags);
41 like( $ccflags, qr/\s-we147/, "On icc, 'cc_flags' set as expected" );
45 $conf->options->set( verbose => 1 );
46 my ($stdout, $stderr);
49 init::hints::linux::_handle_icc_ccflags($conf, $ccflags); },
53 like( $ccflags, qr/\s-we147/, "On icc, 'cc_flags' set as expected" );
55 qr/\sccflags:.*?-we147/,
56 "On icc, got expected verbose output for 'cc_flags'" );
59 pass("Completed all tests in $0");
61 ################### DOCUMENTATION ###################
65 init/hints/linux-01.t - test init::hints::linux
69 % prove t/steps/init/hints/linux-01.t
73 The files in this directory test functionality used by F<Configure.pl>.
75 The tests in this file test init::hints::linux.
83 config::init::hints::linux, F<Configure.pl>.
89 # cperl-indent-level: 4
92 # vim: expandtab shiftwidth=4: