Files
Kir Kolyshkin 2c7405b300 tests/int: add assert helpers, use for exact comparisons
When a test fails on a string comparison, all we see is the failed
expression, which usually means adding some debug output and rerunning
the test to find out what the actual value was.

The bats-assert library solves this, but it (together with its
bats-support dependency) has to be installed separately on every distro
we test on, which is more trouble than it's worth for a few functions.

Add assert_output, refute_output, and assert_line, implementing a subset
of the bats-assert API (so that the tests read the same way, and this
code can be dropped should bats-assert ever be added as a dependency),
and use them for the comparisons against an exact value. Now, when such
a check fails, the test log shows what was expected and what was there:

	-- output does not match (exact) --
	expected: '/override'
	  actual: $'\0/override'
	--

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-10-02 14:47:43 -07:00
..