diff --git a/HISTORY b/HISTORY index 21d467a..ade78da 100644 --- a/HISTORY +++ b/HISTORY @@ -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 ---------------------- diff --git a/package.json b/package.json index 7084a5b..0924587 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "test": "tests" }, "scripts": { - "test": "./urchin tests" + "test": "export PATH=\"$PWD:$PATH\" && urchin tests" }, "bin": "./urchin", "repository": { diff --git a/tests/urchin -sh should start the $TEST_SHELL. b/tests/urchin -sh should start the $TEST_SHELL. new file mode 100755 index 0000000..8045b16 --- /dev/null +++ b/tests/urchin -sh should start the $TEST_SHELL. @@ -0,0 +1,3 @@ +#!/bin/sh + +test c = $(echo 'echo $3' | urchin -sh a 'b b b b' c d e) diff --git a/urchin b/urchin index af71b7b..4f19260 100755 --- a/urchin +++ b/urchin @@ -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