Commit 9f77cf0f authored by Leo Gordon's avatar Leo Gordon
Browse files

bugfix: do not assume the argument list is disposable

parent 8884f0ab
......@@ -227,10 +227,10 @@ sub init_pipeline {
sub _test_ehive_script {
my ($script_name, $url, $args, $test_name) = @_;
$args ||= [];
unshift @$args, (-url => $url) if(defined($url));
$test_name ||= 'Can run '.$script_name.(@$args ? ' with the following cmdline options: '.join(' ', @$args) : '');
my @ext_args = ( defined($url) ? (-url => $url) : (), @$args );
$test_name ||= 'Can run '.$script_name.(@ext_args ? ' with the following cmdline options: '.join(' ', @ext_args) : '');
ok(!system($ENV{'EHIVE_ROOT_DIR'}.'/scripts/'.$script_name.'.pl', @$args), $test_name);
ok(!system($ENV{'EHIVE_ROOT_DIR'}.'/scripts/'.$script_name.'.pl', @ext_args), $test_name);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment