take an argument

This commit is contained in:
Thomas Levine 2012-10-10 15:51:06 -04:00
parent 1bd7b4adf6
commit be4a5fc698
2 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ Download Urchin like so (as root)
Now you can run it. Now you can run it.
urchin urchin <test directory>
## Writing tests ## Writing tests
Make a root directory for your tests. Inside it, put executable files that Make a root directory for your tests. Inside it, put executable files that

6
urchin
View File

@ -46,13 +46,13 @@ recurse() {
fi fi
} }
if [ "$#" = '0' ] if [ "$#" = '1' ] && [ -d "$1" ]
then then
echo Running tests echo Running tests
recurse . recurse "$1"
echo echo
echo Done echo Done
else else
echo 'Run `urchin` without arguments from a directory containing urchin tests.' echo "usage: $0 <test directory>"
echo 'Go to http://www.urchin.sh for documentation on writing tests.' echo 'Go to http://www.urchin.sh for documentation on writing tests.'
fi fi