commit 0d467e4c75e76876174789a78fb21cc8c32f1f35
parent ddcc20a0bad70fd87ed60625460b6efd6a7e84e6
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Wed, 15 Sep 2021 21:16:46 +0300
test_postprocessor: report more details
Diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/microhttpd/test_postprocessor.c b/src/microhttpd/test_postprocessor.c
@@ -209,6 +209,7 @@ test_urlencoding_case (unsigned int want_start,
const char *url_data)
{
size_t step;
+ int errors = 0;
const size_t size = strlen (url_data);
for (step = 1; size >= step; ++step)
@@ -256,15 +257,17 @@ test_urlencoding_case (unsigned int want_start,
if (want_off != want_end)
{
fprintf (stderr,
- "Test failed in line %u.\tStep:%u\n Got: %u\tExpected: %u\n",
+ "Test failed in line %u.\tStep: %u.\tData: \"%s\"\n" \
+ " Got: %u\tExpected: %u\n",
(unsigned int) __LINE__,
(unsigned int) step,
+ url_data,
want_off,
want_end);
- return 1;
+ errors++;
}
}
- return 0;
+ return errors;
}