# HG changeset patch # User Paul Eggert # Date 1362764729 28800 # Node ID b012a6ea32ac0b4fce0bfe18be4d16fe5f3ab697 # Parent f5aaa2379bd491bf2a54ec8f34bf37fe763c8b35 vasnprintf-posix-tests: allow rounding 1.5 to 1 * tests/test-vasnprintf-posix.c (test_function): Don't insist on round-to-even, since POSIX says rounding is implementation-defined and OS X 10.8.2 rounds 1.5 to 1 here. Reported by Gary V. Vaughan in . diff -r f5aaa2379bd4 -r b012a6ea32ac ChangeLog --- a/ChangeLog Fri Mar 08 08:40:26 2013 -0800 +++ b/ChangeLog Fri Mar 08 09:45:29 2013 -0800 @@ -1,5 +1,11 @@ 2013-03-08 Paul Eggert + vasnprintf-posix-tests: allow rounding 1.5 to 1 + * tests/test-vasnprintf-posix.c (test_function): Don't insist on + round-to-even, since POSIX says rounding is implementation-defined + and OS X 10.8.2 rounds 1.5 to 1 here. Reported by Gary V. Vaughan in + . + bootstrap: port to FreeBSD * build-aux/bootstrap (bootstrap_sync): Port sh -c usage to shells that treat '--' differently. Reported by Mats Erik Andersson in diff -r f5aaa2379bd4 -r b012a6ea32ac tests/test-vasnprintf-posix.c --- a/tests/test-vasnprintf-posix.c Fri Mar 08 08:40:26 2013 -0800 +++ b/tests/test-vasnprintf-posix.c Fri Mar 08 09:45:29 2013 -0800 @@ -252,7 +252,8 @@ char *result = my_asnprintf (NULL, &length, "%.0a %d", 1.5, 33, 44, 55); ASSERT (result != NULL); - ASSERT (strcmp (result, "0x2p+0 33") == 0 + ASSERT (strcmp (result, "0x1p+0 33") == 0 + || strcmp (result, "0x2p+0 33") == 0 || strcmp (result, "0x3p-1 33") == 0 || strcmp (result, "0x6p-2 33") == 0 || strcmp (result, "0xcp-3 33") == 0);