1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-11 13:50:48 -05:00

Add another small test.

This commit is contained in:
QC 2014-08-29 17:26:47 +02:00
parent a20e2a5ed9
commit 23136e12a7
2 changed files with 32 additions and 0 deletions

View file

@ -91,3 +91,4 @@ test: rofi
./test/run_errormsg_test.sh ./test/run_errormsg_test.sh
./test/run_switchdialog_test.sh ./test/run_switchdialog_test.sh
./test/run_dmenu_test.sh ./test/run_dmenu_test.sh
./test/run_run_test.sh

31
test/run_run_test.sh Executable file
View file

@ -0,0 +1,31 @@
#!/usr/bin/env bash
# Create fake X
Xvfb :203 &
XPID=$!
# wait till it is up, run rofi with error message
sleep 1;
./rofi -rnow -display :203 &
RPID=$!
# send enter.
sleep 5;
DISPLAY=:203 xdotool key 't'
sleep 0.4
DISPLAY=:203 xdotool key 'r'
sleep 0.4
DISPLAY=:203 xdotool key 'u'
sleep 0.4
DISPLAY=:203 xdotool key 'e'
sleep 0.4
DISPLAY=:203 xdotool key Return
# Get result, kill xvfb
wait ${RPID}
RETV=$?
kill ${XPID}
sleep 1
exit ${RETV}