Skip to content
Snippets Groups Projects
Commit 9c0393a5 authored by Thibault Martin's avatar Thibault Martin
Browse files

[tests] Search given folder in several paths

`./bin/test.sh wp` is equivalent to `./bin/test.sh src/plugins/wp/tests`
parent 45877139
No related branches found
No related tags found
No related merge requests found
...@@ -226,8 +226,16 @@ do ...@@ -226,8 +226,16 @@ do
ALIAS_NAME=$2 ALIAS_NAME=$2
shift shift
;; ;;
*) *)
TESTS+=" $1" if [ -f $1 ] || [ -d $1 ]; then
TESTS+=" $1"
elif [ -d tests/$1 ]; then
TESTS+=" tests/$1"
elif [ -d src/plugins/$1/tests ]; then
TESTS+=" src/plugins/$1/tests"
else
ErrorUsage "'$1' is not a test file or directory"
fi
;; ;;
esac esac
shift shift
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment