mirror of https://github.com/davatorium/rofi.git
Add small script test.
This commit is contained in:
parent
ad1cede6f5
commit
5d5b4aac9f
|
@ -10,4 +10,7 @@ aclocal.m4
|
||||||
autom4te.cache/
|
autom4te.cache/
|
||||||
compile
|
compile
|
||||||
depcomp
|
depcomp
|
||||||
|
*.o
|
||||||
|
*.gcov
|
||||||
|
*.gcda
|
||||||
|
*.gcno
|
||||||
|
|
|
@ -42,3 +42,4 @@ test: ${bin_PROGRAMS}
|
||||||
$(top_srcdir)/test/run_test.sh 202 $(top_srcdir)/test/run_dmenu_test.sh $(top_builddir)
|
$(top_srcdir)/test/run_test.sh 202 $(top_srcdir)/test/run_dmenu_test.sh $(top_builddir)
|
||||||
$(top_srcdir)/test/run_test.sh 203 $(top_srcdir)/test/run_dmenu_custom_test.sh $(top_builddir)
|
$(top_srcdir)/test/run_test.sh 203 $(top_srcdir)/test/run_dmenu_custom_test.sh $(top_builddir)
|
||||||
$(top_srcdir)/test/run_test.sh 204 $(top_srcdir)/test/run_run_test.sh $(top_builddir)
|
$(top_srcdir)/test/run_test.sh 204 $(top_srcdir)/test/run_run_test.sh $(top_builddir)
|
||||||
|
$(top_srcdir)/test/run_test.sh 205 $(top_srcdir)/test/run_script_test.sh $(top_builddir)
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
SP=$(readlink -f "$0")
|
||||||
|
DIR=$(dirname "$SP")
|
||||||
|
echo $DIR
|
||||||
|
# wait till it is up, run rofi with error message
|
||||||
|
sleep 1;
|
||||||
|
rofi -switchers "custom:$DIR/test_script.sh" -show custom &
|
||||||
|
RPID=$!
|
||||||
|
|
||||||
|
# send enter.
|
||||||
|
sleep 5;
|
||||||
|
xdotool key 'Down'
|
||||||
|
sleep 0.4
|
||||||
|
xdotool key Return
|
||||||
|
|
||||||
|
# Get result, kill xvfb
|
||||||
|
wait ${RPID}
|
||||||
|
RETV=$?
|
||||||
|
OUTPUT=$(cat output.txt | tr '\n' ' ')
|
||||||
|
if [ "${OUTPUT}" != 'noot ' ]
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
exit ${RETV}
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
echo "aap"
|
||||||
|
echo "noot"
|
||||||
|
echo "mies"
|
||||||
|
else
|
||||||
|
echo $1 > output.txt
|
||||||
|
fi
|
Loading…
Reference in New Issue