3 # tapdiffer - Render diff between input and checkfile as a TAP report
5 # Usage: tapdiffer LEGEND CHECKFILE
7 # Output is a TAP report, ok if the diff is empty and not ok otherwise.
8 # A nonempty diff is shipped as a TAP YAML block following "not ok"
9 # unless QUIET=1 in the environment.
22 trap 'rm /tmp/tapdiff$$' EXIT HUP INT QUIT TERM
24 if diff --text "${diffopts}" ${checkfile} - >/tmp/tapdiff$$
28 echo "not ok - ${checkfile}: ${legend}"
29 if [ ! "${QUIET}" = 1 ]
32 sed </tmp/tapdiff$$ -e 's/^/ /'