mirror of
https://github.com/tests-always-included/mo.git
synced 2025-11-19 23:34:32 +01:00
Adding mechanism to test command-line variables
This commit is contained in:
13
run-tests
13
run-tests
@@ -10,9 +10,16 @@ for TEST in tests/*.expected; do
|
||||
BASE="${TEST%.expected}"
|
||||
|
||||
echo -n "$BASE ... "
|
||||
echo "Do not read this input" | (
|
||||
. "${BASE}.env"
|
||||
mo "${BASE}.template"
|
||||
|
||||
(
|
||||
if [[ -f "${BASE}.sh" ]]; then
|
||||
# Run a shell script if one exists
|
||||
"${BASE}.sh"
|
||||
else
|
||||
# Fall back to using .env and .template
|
||||
. "${BASE}.env"
|
||||
echo "Do not read this input" | mo "${BASE}.template"
|
||||
fi
|
||||
) | diff -wU5 - "${TEST}" > "${BASE}.diff"
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user