]> Kevux Git Server - rit/commit
test-lib: print escape sequence names
authorPablo Sabater <pabloosabaterr@gmail.com>
Wed, 11 Mar 2026 03:14:42 +0000 (04:14 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Mar 2026 18:38:54 +0000 (11:38 -0700)
commite30e9442fd9b90d96dde2fad4a6b26d7a03dee5e
treec6ef302cdcf0965b04dddda34f1028c94056cb2e
parent67ad42147a7acc2af6074753ebd03d904476118f
test-lib: print escape sequence names

When printing expected/actual characters in failed checks, use
their names (\a, \b, \n, ...) instead of their octal representation,
making it easier to read.

Add tests to test-example-tap.c
Update t0080-unit-test-output.sh to match the desired output

Teach 'print_one_char()' the equivalent name

Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-example-tap.c
t/t0080-unit-test-output.sh
t/unit-tests/test-lib.c