mirror of
https://github.com/davatorium/rofi.git
synced 2025-07-31 21:59:25 -04:00
[dmenu] Update tests to hit the shift-enter mode
This commit is contained in:
parent
8173bafcd6
commit
45e07bb83c
2 changed files with 7 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
xrdb -load ../doc/example.xresources
|
||||||
echo -e -n "aap\nnoot\nmies" | rofi -width -30 -dmenu > output.txt &
|
echo -e -n "aap\nnoot\nmies" | rofi -width -30 -dmenu > output.txt &
|
||||||
RPID=$!
|
RPID=$!
|
||||||
|
|
||||||
|
@ -17,13 +18,14 @@ xdotool key 'e'
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
xdotool key 'e'
|
xdotool key 'e'
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
|
xdotool key Shift+Return
|
||||||
xdotool key Return
|
xdotool key Return
|
||||||
|
|
||||||
# Get result, kill xvfb
|
# Get result, kill xvfb
|
||||||
wait ${RPID}
|
wait ${RPID}
|
||||||
RETV=$?
|
RETV=$?
|
||||||
|
OUTPUT=$(cat output.txt | tr '\n' ' ')
|
||||||
if [ `cat output.txt` != 'coffee' ]
|
if [ "${OUTPUT}" != 'coffee coffee ' ]
|
||||||
then
|
then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -9,15 +9,14 @@ RPID=$!
|
||||||
sleep 5;
|
sleep 5;
|
||||||
xdotool key 'Down'
|
xdotool key 'Down'
|
||||||
sleep 0.4
|
sleep 0.4
|
||||||
xdotool key 'Down'
|
xdotool key Shift+Return
|
||||||
sleep 0.4
|
|
||||||
xdotool key Return
|
xdotool key Return
|
||||||
|
|
||||||
# Get result, kill xvfb
|
# Get result, kill xvfb
|
||||||
wait ${RPID}
|
wait ${RPID}
|
||||||
RETV=$?
|
RETV=$?
|
||||||
|
OUTPUT=$(cat output.txt | tr '\n' ' ')
|
||||||
if [ `cat output.txt` != 'mies' ]
|
if [ "${OUTPUT}" != 'noot mies ' ]
|
||||||
then
|
then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue