use new contains
This commit is contained in:
parent
9ce5c45bed
commit
287fd8a37c
10
urchin
10
urchin
@ -283,7 +283,7 @@ urchin_root() {
|
|||||||
|
|
||||||
abscurrent="$(fullpath "${1}")"
|
abscurrent="$(fullpath "${1}")"
|
||||||
if test "${abscurrent}" = / ||
|
if test "${abscurrent}" = / ||
|
||||||
basename "${abscurrent}" | grep -q '^\.' ; then
|
basename "${abscurrent}" | contains '^\.' ; then
|
||||||
# Stop traversing upwards at / and at hidden directories.
|
# Stop traversing upwards at / and at hidden directories.
|
||||||
if test -d "${orig}"; then
|
if test -d "${orig}"; then
|
||||||
echo "${orig}"
|
echo "${orig}"
|
||||||
@ -315,8 +315,8 @@ recurse() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if contains "${potential_test}" "^${potential_test}" ||
|
if contains "${potential_test}" \
|
||||||
contains "${potential_test}" "^${requested_path}" ; then
|
"^${potential_test}" "^${requested_path}" ; then
|
||||||
if test "$(dirname "${potential_test}")" = \
|
if test "$(dirname "${potential_test}")" = \
|
||||||
"$(dirname "${requested_path}")" &&
|
"$(dirname "${requested_path}")" &&
|
||||||
test "${potential_test}" != "${requested_path}"; then
|
test "${potential_test}" != "${requested_path}"; then
|
||||||
@ -335,7 +335,7 @@ recurse() {
|
|||||||
if [ -d "${potential_test}" ]; then
|
if [ -d "${potential_test}" ]; then
|
||||||
(
|
(
|
||||||
cd -- "${potential_test}"
|
cd -- "${potential_test}"
|
||||||
if test -f .urchin_dir && grep -q series .urchin_dir ; then
|
if test -f .urchin_dir && grep series .urchin_dir > /dev/null; then
|
||||||
run_in_series_dir=true
|
run_in_series_dir=true
|
||||||
else
|
else
|
||||||
run_in_series_dir=false
|
run_in_series_dir=false
|
||||||
@ -670,7 +670,7 @@ validate_test_arg() {
|
|||||||
root="$(urchin_root "${1}")"
|
root="$(urchin_root "${1}")"
|
||||||
if ! {
|
if ! {
|
||||||
basename "$(fullpath "${root}")" |
|
basename "$(fullpath "${root}")" |
|
||||||
grep -qi 'test' || "${force}"
|
grep -i 'test' > /dev/null || "${force}"
|
||||||
}; then
|
}; then
|
||||||
echo 'The root directory of the tests that you are running urchin on
|
echo 'The root directory of the tests that you are running urchin on
|
||||||
does not contain the word "test", so I am not running,
|
does not contain the word "test", so I am not running,
|
||||||
|
Loading…
Reference in New Issue
Block a user