Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/tests/lib/libutil



Module Name:    src
Committed By:   rillig
Date:           Thu Jan 25 18:13:14 UTC 2024

Modified Files:
        src/tests/lib/libutil: t_snprintb.c

Log Message:
tests/libutil/snprintb: clean up and extend tests

In case of a failure, print the details of the test case, including file
and line number of the actual test data. Do not write the format strings
directly to the output, as they contain non-printable bytes and embedded
null bytes.

After a failed test case, continue with the others.

Lay out the format strings according to their structure, to make them
more readable. Remove redundant "\0" at the end of the new-style format
strings.

Fix an off-by-one error in the test data: 0xf is FIFTEEN, not SIXTEEN.

Add a test for performing a restricted subset of rot13 in the format
string, to explore the limits of snprintb formatting.

What's still missing are tests for edge cases and error cases.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/lib/libutil/t_snprintb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index