mirror of
https://github.com/tests-always-included/mo.git
synced 2024-12-24 02:16:38 +00:00
25 lines
343 B
Plaintext
25 lines
343 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
cd "${0%/*}" || exit 1
|
||
|
. ../run-tests
|
||
|
|
||
|
unset __NO_SUCH_VAR
|
||
|
POPULATED="words"
|
||
|
EMPTY=""
|
||
|
arguments=(--fail-not-set)
|
||
|
returnCode=1
|
||
|
|
||
|
template() {
|
||
|
cat <<EOF
|
||
|
Populated: {{POPULATED}};
|
||
|
Empty: {{EMPTY}};
|
||
|
Unset: {{__NO_SUCH_VAR}};
|
||
|
EOF
|
||
|
}
|
||
|
expected() {
|
||
|
cat <<EOF
|
||
|
ERROR: Environment variable not set: __NO_SUCH_VAR
|
||
|
EOF
|
||
|
}
|
||
|
|
||
|
runTest
|