mirror of
https://github.com/tests-always-included/mo.git
synced 2024-12-18 16:27:52 +00:00
26 lines
486 B
Plaintext
26 lines
486 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
cd "${0%/*}" || exit 1
|
||
|
. ../run-tests
|
||
|
|
||
|
testArgs() {
|
||
|
echo "$MO_FUNCTION_ARGS"
|
||
|
}
|
||
|
template() {
|
||
|
cat <<EOF
|
||
|
No args: [{{testArgs}}] - done
|
||
|
One arg: [{{testArgs one}}] - done
|
||
|
Multiple arguments: [{{testArgs aa bb cc 'x' " ! {[_.| }}] - done
|
||
|
Evil: [{{testArgs bla; cat /etc/issue}}] - done
|
||
|
EOF
|
||
|
}
|
||
|
expected() {
|
||
|
cat <<EOF
|
||
|
No args: [] - done
|
||
|
One arg: [one] - done
|
||
|
Multiple arguments: [aa bb cc 'x' " ! {[_.|] - done
|
||
|
Evil: [bla; cat /etc/issue] - done
|
||
|
EOF
|
||
|
}
|
||
|
|
||
|
runTest
|