diff options
-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} |