]> Savannah Git Hosting - gnulib.git/commitdiff
error, verror tests: Add clarification.
authorBruno Haible <bruno@clisp.org>
Thu, 12 Jan 2023 15:39:21 +0000 (16:39 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 12 Jan 2023 15:39:21 +0000 (16:39 +0100)
* tests/test-error.c (main): Clarify why we don't test error_at_line
with a NULL filename.
* tests/test-verror.c (main): Clarify why we don't test verror_at_line
with a NULL filename.

ChangeLog
tests/test-error.c
tests/test-verror.c

index 07f525af08a54e91aa1f36d8d7e52d2dbf4821c0..4a3480b631d8f63eebcef8654d32e864c761a927 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-01-12  Bruno Haible  <bruno@clisp.org>
+
+       error, verror tests: Add clarification.
+       * tests/test-error.c (main): Clarify why we don't test error_at_line
+       with a NULL filename.
+       * tests/test-verror.c (main): Clarify why we don't test verror_at_line
+       with a NULL filename.
+
 2023-01-12  Bruno Haible  <bruno@clisp.org>
 
        verror: Add tests.
index 67600d34f904479d345c98160bf59897c2d96794..697e783eee2a789150b47a1d459c79855a4288d7 100644 (file)
@@ -66,6 +66,10 @@ main (int argc, char *argv[])
   error_print_progname = print_no_progname;
   error (0, 0, "hammer");
   error (0, 0, "boing %d%d%d is too large", 1, 2, 3);
+  #if 0
+  /* The documentation does not describe the output if the file name is NULL. */
+  error_at_line (0, 0, NULL, 42, "drummer too loud");
+  #endif
   error_at_line (0, 0, "d2/bar.c", 11, "bark too loud");
   /* Verify error_message_count.  */
   ASSERT (error_message_count == 11);
index c5a62cddec3b87f1a2955e92e047421e75e49d3a..7c808d790808ca456f766698c6b755fc2897c17d 100644 (file)
@@ -109,6 +109,10 @@ main (int argc, char *argv[])
   error_print_progname = print_no_progname;
   test_zero ("hammer");
   test_zero ("boing %d%d%d is too large", 1, 2, 3);
+  #if 0
+  /* The documentation does not describe the output if the file name is NULL. */
+  test_zero_at_line (NULL, 42, "drummer too loud");
+  #endif
   test_zero_at_line ("d2/bar.c", 11, "bark too loud");
   /* Verify error_message_count.  */
   ASSERT (error_message_count == 11);