From 23136e12a765a1431038573d92a4c33c2cc5e5df Mon Sep 17 00:00:00 2001 From: QC Date: Fri, 29 Aug 2014 17:26:47 +0200 Subject: [PATCH] Add another small test. --- Makefile.am | 1 + test/run_run_test.sh | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100755 test/run_run_test.sh diff --git a/Makefile.am b/Makefile.am index ce715686..304b5b87 100644 --- a/Makefile.am +++ b/Makefile.am @@ -91,3 +91,4 @@ test: rofi ./test/run_errormsg_test.sh ./test/run_switchdialog_test.sh ./test/run_dmenu_test.sh + ./test/run_run_test.sh diff --git a/test/run_run_test.sh b/test/run_run_test.sh new file mode 100755 index 00000000..92f2e2ac --- /dev/null +++ b/test/run_run_test.sh @@ -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}