This commit is contained in:
Thomas Levine 2014-11-05 17:46:19 +00:00
parent bb41d5a156
commit bf8c404784
4 changed files with 8 additions and 4 deletions

1
tests/.print-arg-3 Normal file
View File

@ -0,0 +1 @@
echo $3

View File

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

View File

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

5
urchin
View File

@ -102,6 +102,8 @@ urchin_help() {
echo ' shebang line "#!/bin/sh" with the specified shell.'
echo '-f Force running even if the test directory'\''s name does not'
echo ' contain the word "test".'
echo '-x Run "$TEST_SHELL", falling back on /bin/sh. This might be'
echo ' useful in the shebang line (experimental).'
echo '-h This help.'
# echo
# echo '--xsd Output xUnit XML schema for an integration server.'
@ -175,7 +177,8 @@ 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"
-x) # `urchin -sh` is equivalent to "$TEST_SHELL"
shift
urchinsh=${TEST_SHELL:-/bin/sh}
"$urchinsh" "$@"
exit $?;;