summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/feh.t25
-rw-r--r--test/list_imlib2_1.6/custom4
-rw-r--r--test/list_imlib2_1.6/default5
l---------test/list_imlib2_1.6/filename1
-rw-r--r--test/list_imlib2_1.6/filename_recursive7
l---------test/list_imlib2_1.6/format1
-rw-r--r--test/list_imlib2_1.6/format_reverse5
l---------test/list_imlib2_1.6/height1
l---------test/list_imlib2_1.6/name1
l---------test/list_imlib2_1.6/pixels1
-rw-r--r--test/list_imlib2_1.6/size5
l---------test/list_imlib2_1.6/width1
12 files changed, 48 insertions, 9 deletions
diff --git a/test/feh.t b/test/feh.t
index 47dfbc3..baf5ee4 100644
--- a/test/feh.t
+++ b/test/feh.t
@@ -34,6 +34,13 @@ if ( length($feh_name) == 0 ) {
die($err_no_env);
}
+# Imlib2 1.6+ reports JPEG file format as 'jpg', older versions use 'jpeg'.
+# Determine the output format used in this version with a --customlist call.
+my $list_dir = 'list';
+if (qx{$feh --customlist %t test/ok/jpg} =~ m{jpg}) {
+ $list_dir = 'list_imlib2_1.6';
+}
+
my $version = qx{$feh --version};
if ( $version =~ m{ Compile-time \s switches : \s .* help }ox ) {
$has_help = 1;
@@ -93,14 +100,14 @@ $cmd->stderr_is_eq('');
$cmd = Test::Command->new( cmd => "$feh --list $images" );
$cmd->exit_is_num(0);
-$cmd->stdout_is_file('test/list/default');
+$cmd->stdout_is_file("test/${list_dir}/default");
$cmd->stderr_like($re_warning);
for my $sort (qw/name filename width height pixels size format/) {
$cmd = Test::Command->new( cmd => "$feh --list $images --sort $sort" );
$cmd->exit_is_num(0);
- $cmd->stdout_is_file("test/list/$sort");
+ $cmd->stdout_is_file("test/${list_dir}/$sort");
$cmd->stderr_like($re_warning);
}
@@ -108,7 +115,7 @@ $cmd
= Test::Command->new( cmd => "$feh --list $images --sort format --reverse" );
$cmd->exit_is_num(0);
-$cmd->stdout_is_file('test/list/format_reverse');
+$cmd->stdout_is_file("test/${list_dir}/format_reverse");
$cmd->stderr_like($re_warning);
$cmd = Test::Command->new(
@@ -117,7 +124,7 @@ $cmd = Test::Command->new(
$cmd->exit_is_num(0);
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813729
-#$cmd->stdout_is_file('test/list/filename_recursive');
+#$cmd->stdout_is_file("test/${list_dir}/filename_recursive");
#$cmd->stderr_is_eq('');
# dummy tests to match number of planned tests
$cmd->exit_is_num(0);
@@ -127,19 +134,19 @@ $cmd = Test::Command->new( cmd => "$feh --customlist '%f; %h; %l; %m; %n; %p; "
. "%s; %t; %u; %w' $images" );
$cmd->exit_is_num(0);
-$cmd->stdout_is_file('test/list/custom');
+$cmd->stdout_is_file("test/${list_dir}/custom");
$cmd->stderr_like($re_warning);
$cmd = Test::Command->new( cmd => "$feh --list --quiet $images" );
$cmd->exit_is_num(0);
-$cmd->stdout_is_file('test/list/default');
+$cmd->stdout_is_file("test/${list_dir}/default");
$cmd->stderr_is_eq('');
$cmd = Test::Command->new(
cmd => "$feh --quiet --list --action 'echo \"%f %wx%h\" >&2' $images" );
$cmd->exit_is_num(0);
-$cmd->stdout_is_file('test/list/default');
+$cmd->stdout_is_file("test/${list_dir}/default");
$cmd->stderr_like($re_list_action);
$cmd
@@ -170,12 +177,12 @@ $cmd
= Test::Command->new( cmd => "$feh --list --min-dimension 16x16 $images_ok" );
$cmd->exit_is_num(0);
-$cmd->stdout_is_file('test/list/default');
+$cmd->stdout_is_file("test/${list_dir}/default");
$cmd->stderr_is_eq('');
$cmd
= Test::Command->new( cmd => "$feh --list --max-dimension 16x16 $images_ok" );
$cmd->exit_is_num(0);
-$cmd->stdout_is_file('test/list/default');
+$cmd->stdout_is_file("test/${list_dir}/default");
$cmd->stderr_is_eq('');
diff --git a/test/list_imlib2_1.6/custom b/test/list_imlib2_1.6/custom
new file mode 100644
index 0000000..40ac557
--- /dev/null
+++ b/test/list_imlib2_1.6/custom
@@ -0,0 +1,4 @@
+test/ok/gif; 16; 4; list; gif; 256; 953; gif; 1; 16
+test/ok/jpg; 16; 4; list; jpg; 256; 354; jpg; 2; 16
+test/ok/png; 16; 4; list; png; 256; 403; png; 3; 16
+test/ok/pnm; 16; 4; list; pnm; 256; 269; pnm; 4; 16
diff --git a/test/list_imlib2_1.6/default b/test/list_imlib2_1.6/default
new file mode 100644
index 0000000..e480db3
--- /dev/null
+++ b/test/list_imlib2_1.6/default
@@ -0,0 +1,5 @@
+NUM FORMAT WIDTH HEIGHT PIXELS SIZE ALPHA FILENAME
+1 gif 16 16 256 953 - test/ok/gif
+2 jpg 16 16 256 354 - test/ok/jpg
+3 png 16 16 256 403 X test/ok/png
+4 pnm 16 16 256 269 - test/ok/pnm
diff --git a/test/list_imlib2_1.6/filename b/test/list_imlib2_1.6/filename
new file mode 120000
index 0000000..331d858
--- /dev/null
+++ b/test/list_imlib2_1.6/filename
@@ -0,0 +1 @@
+default \ No newline at end of file
diff --git a/test/list_imlib2_1.6/filename_recursive b/test/list_imlib2_1.6/filename_recursive
new file mode 100644
index 0000000..e42ce14
--- /dev/null
+++ b/test/list_imlib2_1.6/filename_recursive
@@ -0,0 +1,7 @@
+NUM FORMAT WIDTH HEIGHT PIXELS SIZE ALPHA FILENAME
+1 gif 16 16 256 953 - test/ok/gif
+2 jpg 16 16 256 354 - test/ok/jpg
+3 jpg 16 16 256 9k - test/ok/jpg_exif
+4 png 16 16 256 403 X test/ok/png
+5 pnm 16 16 256 269 - test/ok/pnm
+6 png 16 16 256 403 X test/ok/recursive/png
diff --git a/test/list_imlib2_1.6/format b/test/list_imlib2_1.6/format
new file mode 120000
index 0000000..331d858
--- /dev/null
+++ b/test/list_imlib2_1.6/format
@@ -0,0 +1 @@
+default \ No newline at end of file
diff --git a/test/list_imlib2_1.6/format_reverse b/test/list_imlib2_1.6/format_reverse
new file mode 100644
index 0000000..3301f78
--- /dev/null
+++ b/test/list_imlib2_1.6/format_reverse
@@ -0,0 +1,5 @@
+NUM FORMAT WIDTH HEIGHT PIXELS SIZE ALPHA FILENAME
+1 pnm 16 16 256 269 - test/ok/pnm
+2 png 16 16 256 403 X test/ok/png
+3 jpg 16 16 256 354 - test/ok/jpg
+4 gif 16 16 256 953 - test/ok/gif
diff --git a/test/list_imlib2_1.6/height b/test/list_imlib2_1.6/height
new file mode 120000
index 0000000..331d858
--- /dev/null
+++ b/test/list_imlib2_1.6/height
@@ -0,0 +1 @@
+default \ No newline at end of file
diff --git a/test/list_imlib2_1.6/name b/test/list_imlib2_1.6/name
new file mode 120000
index 0000000..331d858
--- /dev/null
+++ b/test/list_imlib2_1.6/name
@@ -0,0 +1 @@
+default \ No newline at end of file
diff --git a/test/list_imlib2_1.6/pixels b/test/list_imlib2_1.6/pixels
new file mode 120000
index 0000000..331d858
--- /dev/null
+++ b/test/list_imlib2_1.6/pixels
@@ -0,0 +1 @@
+default \ No newline at end of file
diff --git a/test/list_imlib2_1.6/size b/test/list_imlib2_1.6/size
new file mode 100644
index 0000000..7716239
--- /dev/null
+++ b/test/list_imlib2_1.6/size
@@ -0,0 +1,5 @@
+NUM FORMAT WIDTH HEIGHT PIXELS SIZE ALPHA FILENAME
+1 pnm 16 16 256 269 - test/ok/pnm
+2 jpg 16 16 256 354 - test/ok/jpg
+3 png 16 16 256 403 X test/ok/png
+4 gif 16 16 256 953 - test/ok/gif
diff --git a/test/list_imlib2_1.6/width b/test/list_imlib2_1.6/width
new file mode 120000
index 0000000..331d858
--- /dev/null
+++ b/test/list_imlib2_1.6/width
@@ -0,0 +1 @@
+default \ No newline at end of file