Loading ChangeLog +1 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ git HEAD * Patch by David Gowers: Add %L format code (temporary copy of filelist) * Fix buffer overflows in printf implementation (affects --action, --customlist, --index-info, --info, --thumb-title, --title) * Fix tests failing when compiled with help=1 Fri, 03 May 2013 21:16:59 +0200 Daniel Friesel <derf+feh@finalrewind.org> Loading src/options.c +4 −0 Original line number Diff line number Diff line Loading @@ -805,6 +805,10 @@ static void show_version(void) "exif " #endif #ifdef INCLUDE_HELP "help " #endif #if _FILE_OFFSET_BITS == 64 "stat64 " #endif Loading test/feh.t +18 −2 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ my $feh = "src/feh"; my $images_ok = 'test/ok/gif test/ok/jpg test/ok/png test/ok/pnm'; my $images_fail = 'test/fail/gif test/fail/jpg test/fail/png test/fail/pnm'; my $images = "${images_ok} ${images_fail}"; my $has_help = 0; my $feh_name = $ENV{'PACKAGE'}; Loading @@ -33,6 +34,11 @@ if (length($feh_name) == 0) { die($err_no_env); } my $version = qx{$feh --version}; if ($version =~ m{ Compile-time \s switches : \s .* help }ox) { $has_help = 1; } my $re_warning = qr{${feh_name} WARNING: test/fail/... \- No Imlib2 loader for that file format\n}; my $re_loadable = qr{test/ok/...}; Loading Loading @@ -139,13 +145,23 @@ $cmd = Test::Command->new(cmd => "$feh --list --min-dimension 20x20 $images_ok") $cmd->exit_is_num(1); $cmd->stdout_is_eq(''); if ($has_help) { $cmd->stderr_is_file('test/no-loadable-files.help'); } else { $cmd->stderr_is_file('test/no-loadable-files'); } $cmd = Test::Command->new(cmd => "$feh --list --max-dimension 10x10 $images_ok"); $cmd->exit_is_num(1); $cmd->stdout_is_eq(''); if ($has_help) { $cmd->stderr_is_file('test/no-loadable-files.help'); } else { $cmd->stderr_is_file('test/no-loadable-files'); } $cmd = Test::Command->new(cmd => "$feh --list --min-dimension 16x16 $images_ok"); Loading test/no-loadable-files.help 0 → 100644 +2 −0 Original line number Diff line number Diff line feh: No loadable images specified. See 'feh --help' or 'man feh' for detailed usage information Loading
ChangeLog +1 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ git HEAD * Patch by David Gowers: Add %L format code (temporary copy of filelist) * Fix buffer overflows in printf implementation (affects --action, --customlist, --index-info, --info, --thumb-title, --title) * Fix tests failing when compiled with help=1 Fri, 03 May 2013 21:16:59 +0200 Daniel Friesel <derf+feh@finalrewind.org> Loading
src/options.c +4 −0 Original line number Diff line number Diff line Loading @@ -805,6 +805,10 @@ static void show_version(void) "exif " #endif #ifdef INCLUDE_HELP "help " #endif #if _FILE_OFFSET_BITS == 64 "stat64 " #endif Loading
test/feh.t +18 −2 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ my $feh = "src/feh"; my $images_ok = 'test/ok/gif test/ok/jpg test/ok/png test/ok/pnm'; my $images_fail = 'test/fail/gif test/fail/jpg test/fail/png test/fail/pnm'; my $images = "${images_ok} ${images_fail}"; my $has_help = 0; my $feh_name = $ENV{'PACKAGE'}; Loading @@ -33,6 +34,11 @@ if (length($feh_name) == 0) { die($err_no_env); } my $version = qx{$feh --version}; if ($version =~ m{ Compile-time \s switches : \s .* help }ox) { $has_help = 1; } my $re_warning = qr{${feh_name} WARNING: test/fail/... \- No Imlib2 loader for that file format\n}; my $re_loadable = qr{test/ok/...}; Loading Loading @@ -139,13 +145,23 @@ $cmd = Test::Command->new(cmd => "$feh --list --min-dimension 20x20 $images_ok") $cmd->exit_is_num(1); $cmd->stdout_is_eq(''); if ($has_help) { $cmd->stderr_is_file('test/no-loadable-files.help'); } else { $cmd->stderr_is_file('test/no-loadable-files'); } $cmd = Test::Command->new(cmd => "$feh --list --max-dimension 10x10 $images_ok"); $cmd->exit_is_num(1); $cmd->stdout_is_eq(''); if ($has_help) { $cmd->stderr_is_file('test/no-loadable-files.help'); } else { $cmd->stderr_is_file('test/no-loadable-files'); } $cmd = Test::Command->new(cmd => "$feh --list --min-dimension 16x16 $images_ok"); Loading
test/no-loadable-files.help 0 → 100644 +2 −0 Original line number Diff line number Diff line feh: No loadable images specified. See 'feh --help' or 'man feh' for detailed usage information