mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
Add fuzzy test.
This commit is contained in:
parent
d661a515f0
commit
dac711cf22
2 changed files with 25 additions and 1 deletions
|
@ -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"
|
||||
|
||||
|
||||
|
|
22
test/run_fuzzy_test.sh
Executable file
22
test/run_fuzzy_test.sh
Executable file
|
@ -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}
|
Loading…
Reference in a new issue