diff options
author | Daniel Friesel <derf@finalrewind.org> | 2010-10-03 11:20:15 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2010-10-03 11:20:15 +0200 |
commit | fdb56cff4f1da6ecf8e008b752b45b3a5e6494f8 (patch) | |
tree | 9325448e022562c613531971ccb423051e38830c /test/feh-bg.i | |
parent | 0cb40fc2424952a4448585236b07c554344d579f (diff) |
Merge test/run-bg into test/feh-bg.i
Not possible for test/ren-interactive, unfortunately.
Diffstat (limited to 'test/feh-bg.i')
-rwxr-xr-x | test/feh-bg.i | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/feh-bg.i b/test/feh-bg.i index 1cfb43f..eeff836 100755 --- a/test/feh-bg.i +++ b/test/feh-bg.i @@ -2,11 +2,14 @@ use strict; use warnings; use 5.010; +use autodie qw/:all/; use GD qw/:DEFAULT :cmp/; use Test::More tests => 70; use Time::HiRes qw/sleep/; +my ($pid_xnest, $pid_twm); + sub set_bg { my ($mode, $file) = @_; @@ -36,6 +39,20 @@ sub check_bg { ); } +if (($pid_xnest = fork()) == 0) { + exec(qw( Xnest -geometry 500x500 :7 )); +} + +sleep(0.5); + +$ENV{'DISPLAY'} = ':7'; + +if (($pid_twm = fork()) == 0) { + exec('twm'); +} + +sleep(0.5); + for my $mode (qw( center fill max scale tile )) { set_bg($mode, 'exact/in'); @@ -51,4 +68,9 @@ for my $mode (qw( center fill max scale tile )) { } } +kill(15, $pid_twm); +sleep(0.2); +kill(15, $pid_xnest); +sleep(0.2); + unlink("/tmp/feh_${$}.png"); |