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 | |
parent | d661a515f0d4519b7da9d3cd4332313bdb9fd9b9 (diff) |
Add fuzzy test.
-rw-r--r-- | Makefile.am | 4 | ||||
-rwxr-xr-x | test/run_fuzzy_test.sh | 22 |
2 files changed, 25 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 71a9c850..d7248214 100644 --- a/Makefile.am +++ b/Makefile.am @@ -200,8 +200,10 @@ test-x: ${bin_PROGRAMS} $(top_srcdir)/test/run_test.sh 215 $(top_srcdir)/test/run_regex_test.sh $(top_builddir) echo "Test dmenu glob" $(top_srcdir)/test/run_test.sh 216 $(top_srcdir)/test/run_glob_test.sh $(top_builddir) + echo "Test dmenu fuzzy" + $(top_srcdir)/test/run_test.sh 217 $(top_srcdir)/test/run_fuzzy_test.sh $(top_builddir) echo "Test config dump" - $(top_srcdir)/test/run_test.sh 217 $(top_srcdir)/test/xr_config_test.sh $(top_builddir) $(top_srcdir) + $(top_srcdir)/test/run_test.sh 218 $(top_srcdir)/test/xr_config_test.sh $(top_builddir) $(top_srcdir) echo "End tests" 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} |