apenwarr-redo/t/260-whichdo/defaults.do
Avery Pennarun a14aa4c86d minimal/do whichdo: should print ../default.do if ../$1.do exists.
It would be incorrect to print ../$1.do (we only use $1.do in the
*current* directly, not prefix dirs; we only use default*.do in
those).  However, when we found ../default.do, we forgot to print it,
because of a silly logic error.
2018-11-02 03:13:45 -04:00

16 lines
302 B
Text

exec >&2
a=$(cd fakesub2 && redo-whichdo d/snork)
# if sh doesn't abort after the above, then it found a .do file as expected
b=$(cat <<EOF
d/snork.do
d/default.do
default.do
EOF
)
if [ "$a" != "$b" ]; then
printf 'redo-whichdo mismatch.\n\ngot:\n%s\n\nexpected:\n%s\n' "$a" "$b"
exit 11
fi