Permalink
Please sign in to comment.
Browse files
Failing tests for 'source' with arguments.
This is a minor cleanup of tests written by BatmanAoD. Co-authored-by: BatmanAoD <BatmanAoD@users.noreply.github.com>
- Loading branch information...
Showing
with
43 additions
and 1 deletion.
- +33 −0 spec/builtins.test.sh
- +2 −0 spec/testdata/show-argv.sh
- +7 −0 spec/testdata/source-argv.sh
- +1 −1 test/spec.sh
| @@ -0,0 +1,2 @@ | ||
| # File that can be sourced | ||
| echo show-argv: $@ |
| @@ -0,0 +1,7 @@ | ||
| #!/bin/bash | ||
| echo source-argv: $@ | ||
| # 'shift' will only apply to the args of 'f()' when no new args are provided. | ||
| # This can mutate the "caller's" arguments array! | ||
| shift | ||
| local foo=foo_val |
0 comments on commit
1d6bbeb