rofi/test/run_dmenu_custom_test.sh

31 lines
414 B
Bash
Raw Normal View History

2014-08-29 15:31:46 +00:00
#!/usr/bin/env bash
echo -e -n "aap\nnoot\nmies" | rofi -width -30 -dmenu > output.txt &
2014-08-29 15:31:46 +00:00
RPID=$!
# send enter.
sleep 5;
xdotool key 'c'
2014-08-29 15:31:46 +00:00
sleep 0.2
xdotool key 'o'
2014-08-29 15:31:46 +00:00
sleep 0.2
xdotool key 'f'
2014-08-29 15:31:46 +00:00
sleep 0.2
xdotool key 'f'
2014-08-29 15:31:46 +00:00
sleep 0.2
xdotool key 'e'
2014-08-29 15:31:46 +00:00
sleep 0.2
xdotool key 'e'
2014-08-29 15:31:46 +00:00
sleep 0.2
xdotool key Return
2014-08-29 15:31:46 +00:00
# Get result, kill xvfb
wait ${RPID}
RETV=$?
if [ `cat output.txt` != 'coffee' ]
then
exit 1
fi
exit ${RETV}