diff options
author | QC <qball@gmpclient.org> | 2014-08-29 16:57:36 +0200 |
---|---|---|
committer | QC <qball@gmpclient.org> | 2014-08-29 16:57:36 +0200 |
commit | 4ab95f5d26c48c63e7d9565e092b2d1eb19ec371 (patch) | |
tree | f4c871cfb33c36c8ccc3729fda249126aec38768 /test | |
parent | 0b4c582c1a9bcf69ba36e2f948fbda536c745403 (diff) |
Add dmenu test.
Diffstat (limited to 'test')
-rwxr-xr-x | test/run_dmenu_test.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/run_dmenu_test.sh b/test/run_dmenu_test.sh new file mode 100755 index 00000000..5bdb84ea --- /dev/null +++ b/test/run_dmenu_test.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# Create fake X +Xvfb :202 & +XPID=$! + +# wait till it is up, run rofi with error message +sleep 1; +echo -e -n "aap\nnoot\nmies" | ./rofi -dmenu -display :202 > output.txt & +RPID=$! + +# send enter. +sleep 5; +DISPLAY=:202 xdotool key 'Down' +sleep 0.4 +DISPLAY=:202 xdotool key 'Down' +sleep 0.4 +DISPLAY=:202 xdotool key Return + +# Get result, kill xvfb +wait ${RPID} +RETV=$? +kill ${XPID} + +sleep 1 + +if [ `cat output.txt` != 'aap' ] +then + exit 1 +fi +exit ${RETV} |