summaryrefslogtreecommitdiff
path: root/gnulib-tests/test-vasprintf-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnulib-tests/test-vasprintf-posix.c')
-rw-r--r--gnulib-tests/test-vasprintf-posix.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gnulib-tests/test-vasprintf-posix.c b/gnulib-tests/test-vasprintf-posix.c
index 503d3269..6a28cffb 100644
--- a/gnulib-tests/test-vasprintf-posix.c
+++ b/gnulib-tests/test-vasprintf-posix.c
@@ -1,5 +1,5 @@
/* Test of POSIX compatible vasprintf() and asprintf() functions.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 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
@@ -232,7 +232,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
int retval =
my_asprintf (&result, "%.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);
@@ -245,7 +246,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
int retval =
my_asprintf (&result, "%.0a %d", 1.51, 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);