mirror of
https://github.com/tests-always-included/mo.git
synced 2025-11-19 23:34:32 +01:00
Pass arguments to function as environment variable MO_ARGS
This commit is contained in:
3
tests/function-args-read.env
Normal file
3
tests/function-args-read.env
Normal file
@@ -0,0 +1,3 @@
|
||||
testArgs() {
|
||||
echo "$MO_ARGS"
|
||||
}
|
||||
4
tests/function-args-read.expected
Normal file
4
tests/function-args-read.expected
Normal file
@@ -0,0 +1,4 @@
|
||||
No args: [] - done
|
||||
One arg: [one] - done
|
||||
Multiple arguments: [aa bb cc 'x' " ! {[_.|] - done
|
||||
Evil: [bla; cat /etc/issue] - done
|
||||
4
tests/function-args-read.template
Normal file
4
tests/function-args-read.template
Normal file
@@ -0,0 +1,4 @@
|
||||
No args: [{{testArgs}}] - done
|
||||
One arg: [{{testArgs one}}] - done
|
||||
Multiple arguments: [{{testArgs aa bb cc 'x' " ! {[_.| }}] - done
|
||||
Evil: [{{testArgs bla; cat /etc/issue}}] - done
|
||||
Reference in New Issue
Block a user