summaryrefslogtreecommitdiff
path: root/tests/test-snprintf-posix.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2007-05-06 15:29:04 +0000
committerBruno Haible <bruno@clisp.org>2007-05-06 15:29:04 +0000
commit2bb894abc6dd417e094aa63774a2bc8b04acb965 (patch)
tree970c0f67597949857ba7f1bc4ecfb628b7eaf13f /tests/test-snprintf-posix.h
parent69868c2282ec566818278b1bc8906439733a94b6 (diff)
downloadgnulib-2bb894abc6dd417e094aa63774a2bc8b04acb965.tar.gz
Work around lack of support of grouping flag.
Diffstat (limited to 'tests/test-snprintf-posix.h')
-rw-r--r--tests/test-snprintf-posix.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test-snprintf-posix.h b/tests/test-snprintf-posix.h
index 36212dceeb..7b1370b88c 100644
--- a/tests/test-snprintf-posix.h
+++ b/tests/test-snprintf-posix.h
@@ -1006,4 +1006,14 @@ test_function (int (*my_snprintf) (char *, size_t, const char *, ...))
ASSERT (strcmp (result, "55 33") == 0);
ASSERT (retval == strlen (result));
}
+
+ /* Test the support of the grouping flag. */
+
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%'d %d", 1234567, 99);
+ ASSERT (result[strlen (result) - 1] == '9');
+ ASSERT (retval == strlen (result));
+ }
}