Fixed blog link in read-me and commented out experimental -x option for now.
This commit is contained in:
parent
2847b020b4
commit
0385dcd86e
@ -138,6 +138,7 @@ To test with multiple shells in sequence, use something like:
|
||||
urchin -s $shell ./tests
|
||||
done
|
||||
|
||||
<!--
|
||||
#### (c) Cross shell tests with `urchin -x` (experimental)
|
||||
If you run urchin with the `-x` flag, it will be as if you ran
|
||||
`$TEST_SHELL`. Unless `$TEST_SHELL` isn't set, in which case it'll
|
||||
@ -151,7 +152,7 @@ It might make sense if you do this.
|
||||
|
||||
export TEST_SHELL=zsh && urchin -x
|
||||
export TEST_SHELL=bash && urchin -x
|
||||
|
||||
-->
|
||||
## Alternatives to Urchin
|
||||
Alternatives to Urchin are discussed in
|
||||
[this blog post](https://blog.tlevine.com/2012/12/how-to-test-shell-scripts/).
|
||||
[this blog post](https://blog.scraperwiki.com/2012/12/how-to-test-shell-scripts/).
|
||||
|
9
urchin
9
urchin
@ -107,14 +107,15 @@ $USAGE
|
||||
have shebang line "#!/bin/sh" with the specified shell.
|
||||
-f Force running even if the test directory's name does not
|
||||
contain the word "test".
|
||||
-x [Experimental; not meant for direct invocation, but for use in
|
||||
the shebang line of test scripts]
|
||||
Run with "\$TEST_SHELL", falling back on /bin/sh.
|
||||
-h This help.
|
||||
|
||||
Go to https://github.com/tlevine/urchin for documentation on writing tests.
|
||||
|
||||
EOF
|
||||
# [Experimental -x option left undocumented for now.]
|
||||
# -x [Experimental; not meant for direct invocation, but for use in
|
||||
# the shebang line of test scripts]
|
||||
# Run with "\$TEST_SHELL", falling back on /bin/sh.
|
||||
}
|
||||
|
||||
plural () {
|
||||
@ -182,7 +183,7 @@ 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; }
|
||||
;;
|
||||
-x) # `urchin -x <test-script>` is equivalent to `"$TEST_SHELL" <test-script>`
|
||||
-x) # [EXPERIMENTAL; UNDOCUMENTED FOR NOW] `urchin -x <test-script>` in a test script's shebang line is equivalent to invoking that script with `"$TEST_SHELL" <test-script>`
|
||||
shift
|
||||
urchinsh=${TEST_SHELL:-/bin/sh}
|
||||
"$urchinsh" "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user