Skip to content

Commit

Permalink
shelltest.od: test that $1/$2/$3 are set correctly in "." scripts.
Browse files Browse the repository at this point in the history
dash seems to fail this one, and it's not pretty.
  • Loading branch information
apenwarr committed Mar 1, 2011
1 parent 32f584c commit ee32a96
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions t/dotparams.od
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# call this as ". ./dotparams.od a b" from shelltest.od
[ "$1" = a ] && [ "$2" = b ] && [ "$#" = 2 ] || fail 115
6 changes: 6 additions & 0 deletions t/shelltest.od
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,10 @@ lt
false
. ./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

0 comments on commit ee32a96

Please sign in to comment.