tests/run.sh: allow to pass full file name

This is easier with shell completion.
This commit is contained in:
Daniel Hahler 2016-12-26 19:09:26 +01:00 committed by Daniel Hahler
parent 8e97ae51c3
commit 8f8094b57e
1 changed files with 7 additions and 3 deletions

View File

@ -199,10 +199,14 @@ for f in $tests; do
start_awesome
if [ ! -r "$f" ]; then
if [ -r "${f#tests/}" ]; then
f=${f#tests/}
else
echo "===> ERROR $f is not readable! <==="
((errors++))
continue
fi
fi
# Send the test file to awesome.
DISPLAY=$D "$AWESOME_CLIENT" 2>&1 < "$f"