diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-06-15 15:13:59 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-06-20 15:02:12 +0100 |
commit | d62382b01f99ab8bac08b01a2609f6fb77a298f5 (patch) | |
tree | 8b138b284eb0026517f3311c22af4e8c4e961497 /perllib | |
parent | 3b72526db1cdb4695f61a188261351ddd2aea395 (diff) |
Test script should run 't' when other args given.
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/TestAppProve.pm | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/perllib/FixMyStreet/TestAppProve.pm b/perllib/FixMyStreet/TestAppProve.pm index 5298d225f..806608b8b 100644 --- a/perllib/FixMyStreet/TestAppProve.pm +++ b/perllib/FixMyStreet/TestAppProve.pm @@ -91,18 +91,18 @@ sub run { local $ENV{FMS_OVERRIDE_CONFIG} = $config_out; - # If no arguments, test everything - unshift @ARGV, 't' unless @ARGV; + my $prove = App::Prove->new; + $prove->process_args(@ARGV); + # If no arguments, test everything + $prove->argv(['t']) unless @{$prove->argv}; # verbose if we have a single file - unshift @ARGV, '--verbose' if @ARGV and -f $ARGV[-1]; + $prove->verbose(1) if @{$prove->argv} and -f $prove->argv->[-1]; + # we always want to recurse + $prove->recurse(1); + # we always want to save state + $prove->state([ @state, 'save' ]); - unshift @ARGV, - '--recurse', # we always want to recurse - '--state', (join ',' => @state, 'save'); # we always want to save state - - my $prove = App::Prove->new; - $prove->process_args(@ARGV); $prove->run; } |