summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-06-18 20:02:26 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-06-18 20:02:26 +0200
commit2da6081818b6a71646ef463ddb2670909390a145 (patch)
tree329762b7bb75f17dad675d01314d604e70db1b73 /test
parent095f8a48e6407e5788dc12a1fafd36ed7217b087 (diff)
Add tests for windowsize and --screen-clip
Diffstat (limited to 'test')
-rwxr-xr-xtest/feh.i17
-rw-r--r--test/huge.pngbin0 -> 149669 bytes
2 files changed, 16 insertions, 1 deletions
diff --git a/test/feh.i b/test/feh.i
index ab28caa..a5157da 100755
--- a/test/feh.i
+++ b/test/feh.i
@@ -4,7 +4,7 @@ use warnings;
use 5.010;
use Cwd;
-use Test::More tests => 65;
+use Test::More tests => 67;
use Time::HiRes qw/sleep/;
use X11::GUITest qw/:ALL/;
@@ -309,3 +309,18 @@ SKIP: {
'w key resizes correctly');
}
feh_stop();
+
+$win = feh_start(q{}, 'test/huge.png');
+ok(waitfor {
+ (GetWindowPos($win))[2] == (GetScreenRes())[0]
+ || (GetWindowPos($win))[3] == (GetScreenRes())[1]
+ },
+ 'Large window limited to screen size');
+feh_stop();
+
+$win = feh_start('--screen-clip 0', 'test/huge.png');
+ok(waitfor {
+ [(GetWindowPos($win))[2, 3]] ~~ [4000, 3000]
+ },
+ 'disabled screen clip');
+feh_stop();
diff --git a/test/huge.png b/test/huge.png
new file mode 100644
index 0000000..1b7e6b0
--- /dev/null
+++ b/test/huge.png
Binary files differ