1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-11 13:50:48 -05:00
rofi/test/run_dmenu_custom_test.sh

39 lines
538 B
Bash
Raw Permalink Normal View History

2014-08-29 11:31:46 -04:00
#!/usr/bin/env bash
2016-07-18 18:16:49 -04:00
echo -e -n "aap\nnoot\nmies" | rofi -width -30 -dmenu -multi-select > output.txt &
2014-08-29 11:31:46 -04:00
RPID=$!
# send enter.
sleep 5;
xdotool key 'c'
2014-08-29 11:31:46 -04:00
sleep 0.2
xdotool key 'o'
2014-08-29 11:31:46 -04:00
sleep 0.2
xdotool key 'f'
2014-08-29 11:31:46 -04:00
sleep 0.2
xdotool key 'f'
2014-08-29 11:31:46 -04:00
sleep 0.2
xdotool key 'e'
2014-08-29 11:31:46 -04:00
sleep 0.2
xdotool key 'e'
2014-08-29 11:31:46 -04:00
sleep 0.2
xdotool key Return
2014-08-29 11:31:46 -04:00
2014-08-29 11:31:46 -04:00
# Get result, kill xvfb
wait ${RPID}
RETV=$?
OUTPUT=$(cat output.txt | tr '\n' ' ')
if [ "${OUTPUT}" != 'coffee ' ]
2014-08-29 11:31:46 -04:00
then
exit 1
fi
OUTPUT=$(rofi -dump-xresources)
if [ -z "${OUTPUT}" ]
then
exit 1
fi
2014-08-29 11:31:46 -04:00
exit ${RETV}