diff options
author | Bruno Haible <bruno@clisp.org> | 2007-05-06 15:29:04 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2007-05-06 15:29:04 +0000 |
commit | 2bb894abc6dd417e094aa63774a2bc8b04acb965 (patch) | |
tree | 970c0f67597949857ba7f1bc4ecfb628b7eaf13f /tests/test-snprintf-posix.h | |
parent | 69868c2282ec566818278b1bc8906439733a94b6 (diff) | |
download | gnulib-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.h | 10 |
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)); + } } |