summaryrefslogtreecommitdiffstats
path: root/test/run_switchdialog_test.sh
diff options
context:
space:
mode:
authorQC <qball@gmpclient.org>2014-08-29 16:24:39 +0200
committerQC <qball@gmpclient.org>2014-08-29 16:24:39 +0200
commitbcbf512dc48745443479694164e2de4bb813181d (patch)
tree625e84874973e8a62e3036225996d550de62bf52 /test/run_switchdialog_test.sh
parent94d17b00019b195bdde2c304f5a02f75693edba2 (diff)
Add another test.
Diffstat (limited to 'test/run_switchdialog_test.sh')
-rwxr-xr-xtest/run_switchdialog_test.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/run_switchdialog_test.sh b/test/run_switchdialog_test.sh
new file mode 100755
index 00000000..fc4f5f54
--- /dev/null
+++ b/test/run_switchdialog_test.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+# Create fake X
+Xvfb :200 &
+XPID=$!
+
+# wait till it is up, run rofi with error message
+sleep 1 && ./rofi -rnow -display :200 &
+RPID=$!
+
+# send enter.
+sleep 5;
+DISPLAY=:200 xdotool key 'shift+slash'
+sleep 0.4
+DISPLAY=:200 xdotool key 'shift+slash'
+sleep 0.4
+DISPLAY=:200 xdotool key 'shift+slash'
+sleep 0.4
+DISPLAY=:200 xdotool key Escape
+
+# Get result, kill xvfb
+wait ${RPID}
+RETV=$?
+kill ${XPID}
+exit ${RETV}