In case of error, pipe something in

This lets me run tests in a terminal.  If I mess up and the terminal is
being read by `cat` or similar, this input is used instead and now my
tests will automatically fail properly.
This commit is contained in:
Tyler Akins 2015-01-23 18:05:27 +00:00
parent c90d0af323
commit 7a271b58f6

View File

@ -9,7 +9,7 @@ for TEST in tests/*.expected; do
BASE="${TEST%.expected}" BASE="${TEST%.expected}"
echo -n "$BASE ... " echo -n "$BASE ... "
( echo "Do not read this input" | (
. "${BASE}.env" . "${BASE}.env"
. ./mo "${BASE}.template" . ./mo "${BASE}.template"
) | diff -wU5 - "${TEST}" > "${BASE}.diff" ) | diff -wU5 - "${TEST}" > "${BASE}.diff"