]> Savannah Git Hosting - gnulib.git/commitdiff
vasnprintf tests: Avoid test failure on HP-UX/hppa and IRIX.
authorBruno Haible <bruno@clisp.org>
Wed, 3 Oct 2018 00:56:57 +0000 (02:56 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 3 Oct 2018 00:56:57 +0000 (02:56 +0200)
* tests/test-vasnprintf.c (test_function): Change the test added on
2018-09-23 to check only the 18 most significant digits.

ChangeLog
tests/test-vasnprintf.c

index e0993f7dbbb23444245c45fcf0cb7b3444f1650c..5b49c2f1f8850ced85721ae4cf3d4892ba80ef15 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2018-10-02  Bruno Haible  <bruno@clisp.org>
 
+       vasnprintf tests: Avoid test failure on HP-UX/hppa and IRIX.
+       * tests/test-vasnprintf.c (test_function): Change the test added on
+       2018-09-23 to check only the 18 most significant digits.
+
        vasnprintf tests: Avoid test failure on Cygwin.
        * tests/test-vasnprintf.c (test_function): Change the test added on
        2018-09-23 to check only the 42 most significant digits.
index 0cd17f98678f0771dfb0ea0424e208186b7ede42..4007a28ffeef6f65b865f1a928bb14680cd572ee 100644 (file)
@@ -74,9 +74,11 @@ test_function (char * (*my_asnprintf) (char *, size_t *, const char *, ...))
          163141592653589790215729350939528493057529598899734151772468186268423257777068536614838678161083520756952076273094236944990208
          On Cygwin, the result is
          163141592653589790215729350939528493057529600000000000000000000000000000000000000000000000000000000000000000000000000000000000
+         On HP-UX 11.31 / hppa and IRIX 6.5, the result is
+         163141592653589790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        */
       ASSERT (strlen (result) == 126);
-      ASSERT (memcmp (result, "163141592653589790215729350939528493057529", 42) == 0);
+      ASSERT (memcmp (result, "163141592653589790", 18) == 0);
       ASSERT (length == 126);
       if (size < 126 + 1)
         ASSERT (result != buf);