X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fm4.git;a=blobdiff_plain;f=tests%2Ftest-vasprintf-posix.c;h=cc1db935450b5a3f013703aa2990b5d04d68db00;hp=9a8d4523df40146c0de239b7da9869a4fe23a291;hb=bbcce2d630bc94f06c99ff627cec033a3a6dcd93;hpb=253a2fc5d9cd390d78a209f08af8ae31b13c44d8 diff --git a/tests/test-vasprintf-posix.c b/tests/test-vasprintf-posix.c index 9a8d452..cc1db93 100644 --- a/tests/test-vasprintf-posix.c +++ b/tests/test-vasprintf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible vasprintf() and asprintf() functions. - Copyright (C) 2007-2016 Free Software Foundation, Inc. + Copyright (C) 2007-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,7 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ @@ -444,7 +444,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) my_asprintf (&result, "%010a %d", Infinityd (), 33, 44, 55); ASSERT (result != NULL); /* "0000000inf 33" is not a valid result; see - */ + */ ASSERT (strcmp (result, " inf 33") == 0); ASSERT (retval == strlen (result)); free (result); @@ -456,7 +456,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) my_asprintf (&result, "%050a %d", NaNd (), 33, 44, 55); ASSERT (result != NULL); /* "0000000nan 33" is not a valid result; see - */ + */ ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0); @@ -708,7 +708,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) { /* Rounding can turn a ...FFF into a ...000. This shows a Mac OS X 10.3.9 (Darwin 7.9) bug and a - glibc 2.4 bug . */ + glibc 2.4 bug . */ char *result; int retval = my_asprintf (&result, "%.1La %d", 1.999L, 33, 44, 55); @@ -844,7 +844,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) my_asprintf (&result, "%010La %d", Infinityl (), 33, 44, 55); ASSERT (result != NULL); /* "0000000inf 33" is not a valid result; see - */ + */ ASSERT (strcmp (result, " inf 33") == 0); ASSERT (retval == strlen (result)); free (result); @@ -856,7 +856,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...)) my_asprintf (&result, "%050La %d", NaNl (), 33, 44, 55); ASSERT (result != NULL); /* "0000000nan 33" is not a valid result; see - */ + */ ASSERT (strlen (result) == 50 + 3 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) && strcmp (result + strlen (result) - 3, " 33") == 0);