urchin -sh

This commit is contained in:
Thomas Levine 2014-11-05 17:15:30 +00:00
parent eafed6ac59
commit 1f115df222
4 changed files with 12 additions and 2 deletions

View File

@ -5,8 +5,11 @@ Version 0.0.3
---------------------
General tidying
Run with different shells
Run with different shells in three ways
* urchin -s
* $TEST_SHELL variable with $TEST_SHELL
* $TEST_SHELL variable with urchin -sh
Before version 0.0.3
----------------------

View File

@ -7,7 +7,7 @@
"test": "tests"
},
"scripts": {
"test": "./urchin tests"
"test": "export PATH=\"$PWD:$PATH\" && urchin tests"
},
"bin": "./urchin",
"repository": {

View File

@ -0,0 +1,3 @@
#!/bin/sh
test c = $(echo 'echo $3' | urchin -sh a 'b b b b' c d e)

4
urchin
View File

@ -169,6 +169,10 @@ do
shell_for_sh_tests=$1
which "$shell_for_sh_tests" >/dev/null || { echo "Cannot find specified shell: '$shell_for_sh_tests'" >&2; urchin_help >&2; exit 2; }
;;
-sh) # `urchin -sh` is equivalent to "$TEST_SHELL"
urchinsh=${TEST_SHELL:-/bin/sh}
"$urchinsh" "$@"
exit $?;;
-h|--help) urchin_help
exit 0;;
-*) urchin_help >&2