This was seen to trigger the EXIT trap on cygwin
* cfg.mk (sc_prohibit_colon_redirection): Disallow all
cases of :> in tests/
* tests/cksum/md5sum-bsd.sh: Adjust to avoid more
stringent syntax check.
done
# Avoid :>file which doesn't propagate errors
+# Also :>file was seen to trigger EXIT trap on cygwin
sc_prohibit_colon_redirection:
- @cd $(srcdir)/tests && GIT_PAGER= git grep -En ': *>.*\|\|' \
- && { echo '$(ME): '"The leading colon in :> will hide errors" >&2; \
+ @cd $(srcdir)/tests && GIT_PAGER= git grep -En ': *>[^>]' \
+ && { echo '$(ME): '":> will hide errors or may trigger EXIT" >&2; \
exit 1; } \
|| :
t=' '
rm check.md5
for i in 'a\b' 'a\' '\a' "a${nl}b" "a${t}b"; do
- : > "$i"
+ rm -f "$i" && touch "$i"
md5sum --tag "$i" >> check.md5 || fail=1
done
md5sum --strict -c check.md5 > out || fail=1