# HG changeset patch # User Bruno Haible # Date 1538470242 -7200 # Node ID 4af9ded9afbaab5efdfd82f80a5ab8d409e7a094 # Parent a8509dc053f17bd9a9bc8c2f7bb8c33024772fe8 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. diff -r a8509dc053f1 -r 4af9ded9afba ChangeLog --- a/ChangeLog Tue Oct 02 01:17:34 2018 +0200 +++ b/ChangeLog Tue Oct 02 10:50:42 2018 +0200 @@ -1,3 +1,9 @@ +2018-10-02 Bruno Haible + + 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. + 2018-10-01 Bruno Haible mkostemp, mkostemps: Update documentation. diff -r a8509dc053f1 -r 4af9ded9afba tests/test-vasnprintf.c --- a/tests/test-vasnprintf.c Tue Oct 02 01:17:34 2018 +0200 +++ b/tests/test-vasnprintf.c Tue Oct 02 10:50:42 2018 +0200 @@ -70,7 +70,13 @@ length = size; result = my_asnprintf (buf, &length, "%2.0f", 1.6314159265358979e+125); ASSERT (result != NULL); - ASSERT (strcmp (result, "163141592653589790215729350939528493057529598899734151772468186268423257777068536614838678161083520756952076273094236944990208") == 0); + /* The exact result and the result on glibc systems is + 163141592653589790215729350939528493057529598899734151772468186268423257777068536614838678161083520756952076273094236944990208 + On Cygwin, the result is + 163141592653589790215729350939528493057529600000000000000000000000000000000000000000000000000000000000000000000000000000000000 + */ + ASSERT (strlen (result) == 126); + ASSERT (memcmp (result, "163141592653589790215729350939528493057529", 42) == 0); ASSERT (length == 126); if (size < 126 + 1) ASSERT (result != buf);