rofi/test/run_switchdialog_test.sh

26 lines
435 B
Bash
Raw Normal View History

2014-08-29 14:24:39 +00:00
#!/usr/bin/env bash
# Create fake X
Xvfb :200 &
XPID=$!
# wait till it is up, run rofi with error message
sleep 1 && ./rofi -rnow -display :200 &
RPID=$!
# send enter.
sleep 5;
DISPLAY=:200 xdotool key 'shift+slash'
sleep 0.4
DISPLAY=:200 xdotool key 'shift+slash'
sleep 0.4
DISPLAY=:200 xdotool key 'shift+slash'
sleep 0.4
DISPLAY=:200 xdotool key Escape
# Get result, kill xvfb
wait ${RPID}
RETV=$?
kill ${XPID}
exit ${RETV}