The commit
commit 1df872fd74
Author: Florian Weimer <fweimer@redhat.com>
Date: Wed Nov 7 12:42:44 2018 +0100
support: Implement TEST_COMPARE_STRING
added the new macro TEST_COMPARE_STRING, which compares the output of
functions under test against expected strings, and, when there's a
mismatch, automatically reports an error and prints the differences.
This patch adapts recently added test cases to use this new macro.
Tested for powerpc64le (as is, and locally patched to intentionally fail
and produce error output).
* argp/tst-ldbl-argp.c (do_one_test): Use TEST_COMPARE_STRING,
instead of manually comparing and reporting mismatching strings.
* misc/tst-ldbl-error.c (do_one_test): Likewise.
* misc/tst-ldbl-warn.c (do_one_test): Likewise.
Similarly to what has been done for argp_error, and argp_failure, as
well as for warn, warnx, vwarn, and vwarnx, this patch adds new tests
for the following functions: err, errx, verr, verrx, error, and
error_at_line. The new tests check that the conversion of long double
variables into string works correctly on the default format of the type.
Future patches will reuse these tests for other formats that long double
can take.
Tested for powerpc64le.
* misc/Makefile (tests): Add tst-ldbl-error.
* misc/tst-ldbl-error.c: New file.