1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-03 04:23:42 -05:00
rofi/test/run_dmenu_custom_test.sh
Dave Davenport ad1cede6f5 Add dump-xresources to test.
* TODO: validate result.
2014-08-31 09:44:42 +02:00

40 lines
594 B
Bash
Executable file

#!/usr/bin/env bash
xrdb -load ../doc/example.xresources
echo -e -n "aap\nnoot\nmies" | rofi -width -30 -dmenu > output.txt &
RPID=$!
# send enter.
sleep 5;
xdotool key 'c'
sleep 0.2
xdotool key 'o'
sleep 0.2
xdotool key 'f'
sleep 0.2
xdotool key 'f'
sleep 0.2
xdotool key 'e'
sleep 0.2
xdotool key 'e'
sleep 0.2
xdotool key Shift+Return
xdotool key Return
# Get result, kill xvfb
wait ${RPID}
RETV=$?
OUTPUT=$(cat output.txt | tr '\n' ' ')
if [ "${OUTPUT}" != 'coffee coffee ' ]
then
exit 1
fi
OUTPUT=$(rofi -dump-xresources)
if [ -z "${OUTPUT}" ]
then
exit 1
fi
exit ${RETV}