diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-03-27 23:59:51 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-03-27 23:59:51 -0400 |
commit | ead84f05c3116fec519a27be776b1206416195d9 (patch) | |
tree | d4058054b047c7f6ac59283adf0531e1bef5199b /snprintf.c | |
parent | a9baddd7d07b9fe15e212985a808a79773ec72e4 (diff) | |
download | libc-testsuite-ead84f05c3116fec519a27be776b1206416195d9.tar.gz |
new snprintf and swprintf tests
Diffstat (limited to 'snprintf.c')
-rw-r--r-- | snprintf.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -95,6 +95,10 @@ int test_snprintf(void) int err=0; char b[500], *s; + TEST(i, snprintf(0, 0, "%d", 123456), 6, "length returned %d != %d"); + TEST(i, snprintf(0, 0, "%.4s", "hello"), 4, "length returned %d != %d"); + TEST(i, snprintf(b, 0, "%.0s", "goodbye"), 0, "length returned %d != %d"); + strcpy(b, "xxxxxxxx"); TEST(i, snprintf(b, 4, "%d", 123456), 6, "length returned %d != %d"); TEST_S(b, "123", "incorrect output"); |