shelltest.od: test that $1/$2/$3 are set correctly in "." scripts.
dash seems to fail this one, and it's not pretty.
This commit is contained in:
parent
32f584cb1c
commit
ee32a965d8
2 changed files with 8 additions and 0 deletions
2
t/dotparams.od
Normal file
2
t/dotparams.od
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
# call this as ". ./dotparams.od a b" from shelltest.od
|
||||||
|
[ "$1" = a ] && [ "$2" = b ] && [ "$#" = 2 ] || fail 115
|
||||||
|
|
@ -289,4 +289,10 @@ lt
|
||||||
false
|
false
|
||||||
. ./nothing.od || warn 114
|
. ./nothing.od || warn 114
|
||||||
|
|
||||||
|
# this one seems to be a bug in some versions of dash: the parameters to the
|
||||||
|
# '.' command must not be ignored.
|
||||||
|
set x y z
|
||||||
|
. ./dotparams.od a b || fail 115
|
||||||
|
[ "$1-$2-$3" = "x-y-z" ] || fail 116
|
||||||
|
|
||||||
exit $FAIL
|
exit $FAIL
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue