Skip to content
Snippets Groups Projects
Commit fdb56cff authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Merge test/run-bg into test/feh-bg.i

Not possible for test/ren-interactive, unfortunately.
parent 0cb40fc2
No related branches found
No related tags found
No related merge requests found
......@@ -13,8 +13,7 @@ test: all
test-x11: all
test/run-interactive
sleep 3
test/run-bg
prove test/feh-bg.i
install: install-man install-doc install-bin install-font install-img
......
......@@ -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");
#!/bin/sh
Xnest -geometry 500x500 :7 > /dev/null 2>&1 &
pid=${!}
# Wallpaper setting requires a window manager to work reliably
DISPLAY=:7 twm > /dev/null 2>&1 &
DISPLAY=:7 prove -v test/feh-bg.i
ret=${?}
kill ${pid}
exit ${ret}
......@@ -8,4 +8,6 @@ ret=${?}
kill ${pid}
sleep 2
exit ${ret}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment