2016-01-04 12:26:18 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# wait till it is up, run rofi with error message
|
2021-08-14 07:03:16 -04:00
|
|
|
sleep 1
|
2016-08-19 13:40:39 -04:00
|
|
|
ulimit -c unlimited
|
2021-08-14 07:03:16 -04:00
|
|
|
echo -e -n "aap\nnoot\nmies" | rofi -dmenu -normal-window -multi-select > output.txt &
|
2016-01-04 12:26:18 -05:00
|
|
|
RPID=$!
|
2016-01-04 14:56:54 -05:00
|
|
|
sleep 4
|
2016-01-05 11:14:47 -05:00
|
|
|
xdotool getactivewindow windowsize 100% 100%
|
2016-01-04 15:51:08 -05:00
|
|
|
echo "Window resized"
|
2016-01-04 12:26:18 -05:00
|
|
|
# send enter.
|
2016-01-04 14:56:54 -05:00
|
|
|
sleep 1
|
2021-08-14 07:03:16 -04:00
|
|
|
xdotool key 'Down'
|
2016-01-04 12:26:18 -05:00
|
|
|
sleep 0.4
|
|
|
|
xdotool key Shift+Return
|
2016-06-26 05:10:50 -04:00
|
|
|
xdotool key Shift+Return
|
2016-01-04 12:26:18 -05:00
|
|
|
xdotool key Return
|
|
|
|
|
2021-08-14 07:03:16 -04:00
|
|
|
# Get result, kill xvfb
|
|
|
|
wait "${RPID}"
|
2016-01-04 12:26:18 -05:00
|
|
|
RETV=$?
|
2016-08-19 13:40:39 -04:00
|
|
|
if [ "${RETV}" == "139" ]
|
|
|
|
then
|
|
|
|
echo "thread apply all bt" | gdb rofi core.*
|
|
|
|
fi
|
|
|
|
|
2019-02-02 06:35:37 -05:00
|
|
|
OUTPUT=$( tr '\n' ' ' < output.txt )
|
2016-01-04 12:26:18 -05:00
|
|
|
if [ "${OUTPUT}" != 'noot mies ' ]
|
|
|
|
then
|
|
|
|
echo "Got: '${OUTPUT}' expected 'noot mies '"
|
|
|
|
exit 1
|
|
|
|
fi
|
2021-08-14 07:03:16 -04:00
|
|
|
echo "${RETV}"
|
|
|
|
exit "${RETV}"
|