diff options
Diffstat (limited to 'test/feh.t')
-rw-r--r-- | test/feh.t | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -2,7 +2,7 @@ use strict; use warnings; use 5.010; -use Test::Command tests => 71; +use Test::Command tests => 73; $ENV{HOME} = 'test'; @@ -46,8 +46,11 @@ if ( $version =~ m{ Compile-time \s switches : \s .* help }ox ) { $has_help = 1; } +# Imlib2 1.8+ returns "Invalid image file" rather than "No Imlib2 loader". +# feh compiled with magic=1 returns "Does not look like an image (magic bytes missing)" +# Here, we accept all three. my $re_warning - = qr{${feh_name} WARNING: test/fail/... \- Does not look like an image \(magic bytes missing\)\n}; + = qr{${feh_name} WARNING: test/fail/... \- (Invalid image file|No Imlib2 loader for that file format|Does not look like an image \(magic bytes missing\))\n}; my $re_loadable = qr{test/ok/...}; my $re_unloadable = qr{test/fail/...}; my $re_list_action = qr{test/ok/... 16x16}; @@ -186,3 +189,7 @@ $cmd $cmd->exit_is_num(0); $cmd->stdout_is_file("test/${list_dir}/default"); $cmd->stderr_is_eq(''); + +$cmd = Test::Command->new( cmd => "$feh --list test/tiny.pbm" ); +$cmd->exit_is_num(0); +$cmd->stderr_is_eq(''); |