diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-08 21:25:37 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-08 21:25:37 +0200 |
commit | 0fddcf6c9db76005a5f5fe3189cfcfb24b3d79b3 (patch) | |
tree | 01a17b3ef2c2d9700f5040c5c1fc2bf0f263ff97 /test | |
parent | 7111c1f803d46ceb486b453bcbc0242c0c3efaba (diff) |
feh.t: Make sure feh doesn't try to create ~/.fehrc (for build servers etc)
Diffstat (limited to 'test')
-rw-r--r-- | test/feh.t | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -4,7 +4,8 @@ use warnings; use 5.010; use Test::Command tests => 48; -my $feh = 'src/feh'; +my $fehrc = "/tmp/.fehrc-$$"; +my $feh = "src/feh --rcfile $fehrc"; my $images = 'test/ok.* test/fail.*'; my ($feh_name, $feh_version) = @ENV{'PACKAGE', 'VERSION'}; @@ -13,6 +14,11 @@ my ($feh_name, $feh_version) = @ENV{'PACKAGE', 'VERSION'}; # make sure they are capable of doing so. delete $ENV{'DISPLAY'}; +# Create empty fehrc so that feh does not create one in $HOME +# (mostly for build servers) +open(my $fh, '>', $fehrc) or die("Can't create $fehrc: $!"); +close($fh) or die("Can't close $fehrc: $!"); + my $err_no_env = <<'EOF'; Unable to determine feh PACKAGE or VERSION. @@ -102,3 +108,5 @@ $cmd = Test::Command->new(cmd => $cmd->exit_is_num(0); $cmd->stdout_is_file('test/list'); $cmd->stderr_like($re_list_action); + +unlink($fehrc); |