TAPDIFFER(1)
π TAPDIFFER(1) π
okay so welcome to tapdiffer(1), bestie β the little TAP-line generator that compares your input against a check file, and honestly? she ate. β¨
π NAME π
tapdiffer β a TAP-line generator that compares input against a check file π
π¦ SYNOPSIS π¦
tapdiffer [-b] legend checkfile
πΈ DESCRIPTION πΈ
So here's the vibe: this utility is a TAP producer. It takes standard input, compares it against the checkfile you named, and reports back. The output starts with an unnumbered TAP report line β and inside that line, the checkfile and legend arguments are what supply the text part. iykyk π
If the diff comes back empty, the report is a solitary ok line. Iconic. Clean. No notes. π
If the diff is nonempty, the report is a not ok line followed by the diff itself, formatted as a TAP14 YAML attachment. π
π«Ά heads up: if the environment variable QUIET is nonempty, the YAML section gets suppressed. silence is golden, etc etc.
Now, the -b option β if you include it, it tells the diff utility to ignore trailing whitespace and to treat all runs of whitespace within a line as equivalent to a single space. lowkey so useful. β¨
A typical Makefile snippet to invoke this on a set of log (.log) and checkfile (.chk) pairs β testing a filter named by FILTER β might look like this:
TESTLOADS := $(shell ls *.log | sed '/.log/s///')
tap:
echo "1..$$(ls *.log | wc -l)"
@for test in $(TESTLOADS); \
do \
legend=$$(sed -n -e '/^## /s///p' <$${test}.log); \
$(FILTER) <"$${test}.log" | ./tapdiffer "$${legend}" "$${test}.chk"; \
done
check:
$(MAKE) tap | tapview
β REQUIREMENTS β
tapdiffer is written in pure POSIX shell, no cap. π
It needs a version of diff(1) that accepts the -u and -b options β something like GNU diff. That's literally it. There are no other dependencies. main character energy fr fr π
π ERROR RETURNS π
Always returns 0. always. no matter what. she's unbothered. π§
π AUTHOR π
Eric S. Raymond esr@thyrsus.com. The public repository is at on GitLab https://gitlab.com/esr/tapview. π«Ά
k bye bestie, go write some TAP π β this page is from the TAPDIFFER(1) manual, dated 1980-01-01, and it's the whole thing, no crumbs left. π
π¦ where this page comes from
- nixos 26.05: tapview 1.15
- nixpkgs unstable: tapview 1.15
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms