mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Add test for issue #292
This commit is contained in:
parent
273d09ba1a
commit
a5c5ca9f1d
2 changed files with 50 additions and 0 deletions
|
@ -184,6 +184,8 @@ test-x: ${bin_PROGRAMS}
|
|||
$(top_srcdir)/test/run_test.sh 207 $(top_srcdir)/test/run_issue_275.sh $(top_builddir)
|
||||
echo "Crash empty list"
|
||||
$(top_srcdir)/test/run_test.sh 208 $(top_srcdir)/test/run_dmenu_empty.sh $(top_builddir)
|
||||
echo "Test multiple select"
|
||||
$(top_srcdir)/test/run_test.sh 209 $(top_srcdir)/test/run_dmenu_issue_292.sh $(top_builddir)
|
||||
echo "End tests"
|
||||
|
||||
|
||||
|
|
48
test/run_dmenu_issue_292.sh
Executable file
48
test/run_dmenu_issue_292.sh
Executable file
|
@ -0,0 +1,48 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# wait till it is up, run rofi with error message
|
||||
sleep 1;
|
||||
seq 0 100 | rofi -dmenu > output.txt &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5;
|
||||
xdotool key '2'
|
||||
sleep 0.4
|
||||
xdotool key Shift+Return
|
||||
#2
|
||||
xdotool key Shift+Return
|
||||
#20
|
||||
xdotool key Shift+Return
|
||||
#21
|
||||
xdotool key Shift+Return
|
||||
#22
|
||||
xdotool key Shift+Return
|
||||
#23
|
||||
xdotool key Shift+Return
|
||||
#24
|
||||
xdotool key Shift+Return
|
||||
#25
|
||||
xdotool key Shift+Return
|
||||
#26
|
||||
xdotool key Shift+Return
|
||||
#27
|
||||
xdotool key Shift+Return
|
||||
#28
|
||||
xdotool key Shift+Return
|
||||
#29
|
||||
xdotool key Shift+Return
|
||||
#32
|
||||
xdotool key Return
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait ${RPID}
|
||||
RETV=$?
|
||||
OUTPUT=$(cat output.txt | tr '\n' ' ')
|
||||
if [ "${OUTPUT}" != '2 12 20 21 22 23 24 25 26 27 28 29 32 ' ]
|
||||
then
|
||||
echo "Got: '${OUTPUT}' expected '2 12 20 21 22 23 24 25 26 27 28 29 32 '"
|
||||
exit 1
|
||||
fi
|
||||
echo ${RETV}
|
||||
exit ${RETV}
|
Loading…
Reference in a new issue