summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-01-04 18:04:15 +0100
committerDave Davenport <qball@gmpclient.org>2016-01-04 18:04:15 +0100
commitdac711cf22a36a66876cd107531a2efd1b54a4f8 (patch)
tree181c02887fa7ea34c18a82faebc420bd8bbf4c39 /test
parentd661a515f0d4519b7da9d3cd4332313bdb9fd9b9 (diff)
Add fuzzy test.
Diffstat (limited to 'test')
-rwxr-xr-xtest/run_fuzzy_test.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/run_fuzzy_test.sh b/test/run_fuzzy_test.sh
new file mode 100755
index 00000000..e7e5d81a
--- /dev/null
+++ b/test/run_fuzzy_test.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+echo -en "nooty\naap\nnoot\nmies" | rofi -fuzzy -dmenu > output.txt &
+RPID=$!
+
+# send enter.
+sleep 5;
+xdotool type 'nty'
+sleep 0.4
+xdotool key Return
+
+# Get result, kill xvfb
+wait ${RPID}
+RETV=$?
+OUTPUT=$(cat output.txt)
+if [ "${OUTPUT}" != 'nooty' ]
+then
+ echo "Got: '${OUTPUT}' expected 'nooty'"
+ exit 1
+fi
+
+exit ${RETV}