Commit ed04d2c3 authored by Matthieu Muffato's avatar Matthieu Muffato
Browse files

Run the test in a temp directory to avoid creating files everywhere

parent e8c1e51c
......@@ -18,12 +18,16 @@ use warnings;
use Test::More;
use Data::Dumper;
use File::Temp qw{tempdir};
BEGIN {
use_ok( 'Bio::EnsEMBL::Hive::Utils', 'join_command_args' );
}
#########################
my $dir = tempdir CLEANUP => 1;
chdir $dir;
# block 1: the command line is given as a string
{
is_deeply([join_command_args("ls")], [0,"ls"], "String: the executable name");
......@@ -46,4 +50,6 @@ BEGIN {
is_deeply([join_command_args(["ls", "|", "cat", ">", "file space"])], [1, "ls | cat > 'file space'"], "Array with a pipe and a redirection");
}
chdir $ENV{'EHIVE_ROOT_DIR'};
done_testing();
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