mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Add dmenu test.
This commit is contained in:
parent
0b4c582c1a
commit
4ab95f5d26
2 changed files with 32 additions and 0 deletions
|
@ -90,3 +90,4 @@ test: rofi
|
||||||
make -C test/ test
|
make -C test/ test
|
||||||
./test/run_errormsg_test.sh
|
./test/run_errormsg_test.sh
|
||||||
./test/run_switchdialog_test.sh
|
./test/run_switchdialog_test.sh
|
||||||
|
./test/run_dmenu_test.sh
|
||||||
|
|
31
test/run_dmenu_test.sh
Executable file
31
test/run_dmenu_test.sh
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Create fake X
|
||||||
|
Xvfb :202 &
|
||||||
|
XPID=$!
|
||||||
|
|
||||||
|
# wait till it is up, run rofi with error message
|
||||||
|
sleep 1;
|
||||||
|
echo -e -n "aap\nnoot\nmies" | ./rofi -dmenu -display :202 > output.txt &
|
||||||
|
RPID=$!
|
||||||
|
|
||||||
|
# send enter.
|
||||||
|
sleep 5;
|
||||||
|
DISPLAY=:202 xdotool key 'Down'
|
||||||
|
sleep 0.4
|
||||||
|
DISPLAY=:202 xdotool key 'Down'
|
||||||
|
sleep 0.4
|
||||||
|
DISPLAY=:202 xdotool key Return
|
||||||
|
|
||||||
|
# Get result, kill xvfb
|
||||||
|
wait ${RPID}
|
||||||
|
RETV=$?
|
||||||
|
kill ${XPID}
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
if [ `cat output.txt` != 'aap' ]
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
exit ${RETV}
|
Loading…
Reference in a new issue