summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2014-08-31 09:28:55 +0200
committerDave Davenport <qball@gmpclient.org>2014-08-31 09:28:55 +0200
commit45e07bb83ccaf0bb822bf67d04219eb2559c65b7 (patch)
tree1ecb976438aef67940f4337c97b3a3711f72dfa2 /test
parent8173bafcd68dfb6961541fbd3f6325fb65b58bb1 (diff)
[dmenu] Update tests to hit the shift-enter mode
Diffstat (limited to 'test')
-rwxr-xr-xtest/run_dmenu_custom_test.sh6
-rwxr-xr-xtest/run_dmenu_test.sh7
2 files changed, 7 insertions, 6 deletions
diff --git a/test/run_dmenu_custom_test.sh b/test/run_dmenu_custom_test.sh
index 039d5ab8..43000f1b 100755
--- a/test/run_dmenu_custom_test.sh
+++ b/test/run_dmenu_custom_test.sh
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
+xrdb -load ../doc/example.xresources
echo -e -n "aap\nnoot\nmies" | rofi -width -30 -dmenu > output.txt &
RPID=$!
@@ -17,13 +18,14 @@ xdotool key 'e'
sleep 0.2
xdotool key 'e'
sleep 0.2
+xdotool key Shift+Return
xdotool key Return
# Get result, kill xvfb
wait ${RPID}
RETV=$?
-
-if [ `cat output.txt` != 'coffee' ]
+OUTPUT=$(cat output.txt | tr '\n' ' ')
+if [ "${OUTPUT}" != 'coffee coffee ' ]
then
exit 1
fi
diff --git a/test/run_dmenu_test.sh b/test/run_dmenu_test.sh
index 3cedd65e..d02e538b 100755
--- a/test/run_dmenu_test.sh
+++ b/test/run_dmenu_test.sh
@@ -9,15 +9,14 @@ RPID=$!
sleep 5;
xdotool key 'Down'
sleep 0.4
-xdotool key 'Down'
-sleep 0.4
+xdotool key Shift+Return
xdotool key Return
# Get result, kill xvfb
wait ${RPID}
RETV=$?
-
-if [ `cat output.txt` != 'mies' ]
+OUTPUT=$(cat output.txt | tr '\n' ' ')
+if [ "${OUTPUT}" != 'noot mies ' ]
then
exit 1
fi