From: Bruno Haible Date: Fri, 13 Apr 2007 10:56:10 +0000 (+0000) Subject: Guard against FreeBSD 6.1 bug. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d17c282353f9885291aa5901d364db032a0e065;p=pspp Guard against FreeBSD 6.1 bug. --- diff --git a/tests/test-printf-posix.h b/tests/test-printf-posix.h index 470e025eeb..5f91480a5d 100644 --- a/tests/test-printf-posix.h +++ b/tests/test-printf-posix.h @@ -61,6 +61,16 @@ test_function (int (*my_printf) (const char *, ...)) /* NaN. */ my_printf ("%a %d\n", NaN (), 33, 44, 55); + /* FLAG_ZERO with infinite number. */ + /* "0000000inf 33" is not a valid result; see + */ + my_printf ("%010a %d\n", 1.0 / 0.0, 33, 44, 55); + + /* FLAG_ZERO with NaN. */ + /* "0000000nan 33" is not a valid result; see + */ + my_printf ("%010a %d\n", NaN (), 33, 44, 55); + /* Test the support of the POSIX/XSI format strings with positions. */ my_printf ("%2$d %1$d\n", 33, 55);