diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-01-04 18:04:15 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-01-04 18:04:15 +0100 |
commit | dac711cf22a36a66876cd107531a2efd1b54a4f8 (patch) | |
tree | 181c02887fa7ea34c18a82faebc420bd8bbf4c39 /test/run_fuzzy_test.sh | |
parent | d661a515f0d4519b7da9d3cd4332313bdb9fd9b9 (diff) |
Add fuzzy test.
Diffstat (limited to 'test/run_fuzzy_test.sh')
-rwxr-xr-x | test/run_fuzzy_test.sh | 22 |
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} |