summaryrefslogtreecommitdiffstats
path: root/test/run_fuzzy_test.sh
blob: b055b328545b2328afe1b202150d82b0afd4589b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash

echo -en "nooty\naap\nnoot\nmies" | rofi -fuzzy -no-regex -dmenu   > output.txt  &
RPID=$!

# send enter.
sleep 5;
xdotool type 'nty'
sleep 0.4
xdotool key Return

#  Get result, kill xvfb
wait ${RPID}
RETV=$?
OUTPUT=$(cat output.txt)
if [ "${OUTPUT}" != 'nooty' ]
then
    echo "Got: '${OUTPUT}' expected 'nooty'"
    exit 1
fi

exit ${RETV}