2 # Copyright (C) 2007, The Perl Foundation.
4 # 02-get_test_prog_args.t
12 use Parrot::Config qw( %PConfig );
14 plan( skip_all => 't/harness only runs once configuration has completed' )
18 use Parrot::Harness::Options qw( get_test_prog_args );
21 my ($gc_debug, $run_exec);
28 ($gc_debug, $run_exec) = (0,0);
29 $args = get_test_prog_args($optsref, $gc_debug, $run_exec);
30 like($args, qr/-d/, "Got expected option");
31 like($args, qr/-g/, "Got expected option");
32 like($args, qr/-D40/, "Got expected option");
40 ($gc_debug, $run_exec) = (0,0);
41 $args = get_test_prog_args($optsref, $gc_debug, $run_exec);
42 like($args, qr/-d/, "Got expected option");
43 like($args, qr/-g/, "Got expected option");
44 like($args, qr/-D40/, "Got expected option");
45 like($args, qr/-O2/, "Got expected option");
52 ($gc_debug, $run_exec) = (1,0);
53 $args = get_test_prog_args($optsref, $gc_debug, $run_exec);
54 like($args, qr/-d/, "Got expected option");
55 like($args, qr/-g/, "Got expected option");
56 like($args, qr/-D40/, "Got expected option");
57 like($args, qr/\s--gc-debug/, "Got expected option");
64 ($gc_debug, $run_exec) = (0,1);
65 $args = get_test_prog_args($optsref, $gc_debug, $run_exec);
66 like($args, qr/-d/, "Got expected option");
67 like($args, qr/-g/, "Got expected option");
68 like($args, qr/-D40/, "Got expected option");
69 like($args, qr/\s--run-exec/, "Got expected option");
71 pass("Completed all tests in $0");
73 ################### DOCUMENTATION ###################
77 02-get_test_prog_args.t - test Parrot::Harness::Options
81 % prove t/pharness/02-get_test_prog_args.t
85 This file holds tests for Parrot::Harness::Options::get_test_prog_args().
93 Parrot::Harness::Options, F<t/harness>.
99 # cperl-indent-level: 4
102 # vim: expandtab shiftwidth=4: