mirror of
https://github.com/lbonn/rofi
synced 2024-11-23 04:13:03 +00:00
Add another test.
This commit is contained in:
parent
94d17b0001
commit
bcbf512dc4
3 changed files with 32 additions and 1 deletions
|
@ -9,6 +9,6 @@ before_install:
|
|||
- sudo pip install cpp-coveralls
|
||||
|
||||
script:
|
||||
- autoreconf -i && ./configure --enable-gcov && make && make -C test/ test && ./test/run_errormsg_test.sh
|
||||
- autoreconf -i && ./configure --enable-gcov && make && make test
|
||||
after_success:
|
||||
- coveralls -x c --gcov-options '\-lp'
|
||||
|
|
|
@ -84,3 +84,9 @@ indent: ${rofi_SOURCES}
|
|||
|
||||
update-manpage: ${top_srcdir}/doc/rofi-manpage.markdown
|
||||
md2man-roff $^ > ${top_srcdir}/doc/rofi.1
|
||||
|
||||
.PHONY: test
|
||||
test: rofi
|
||||
make -C test/ test
|
||||
./test/run_errormsg_test.sh
|
||||
./test/run_switchdialog_test.sh
|
||||
|
|
25
test/run_switchdialog_test.sh
Executable file
25
test/run_switchdialog_test.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/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}
|
Loading…
Reference in a new issue