aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/tests
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/tests')
-rw-r--r--lib/libc/tests/stdio/snprintf_test.c8
-rw-r--r--lib/libc/tests/stdio/swprintf_test.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/libc/tests/stdio/snprintf_test.c b/lib/libc/tests/stdio/snprintf_test.c
index d5f056b9542d..b805f513c402 100644
--- a/lib/libc/tests/stdio/snprintf_test.c
+++ b/lib/libc/tests/stdio/snprintf_test.c
@@ -171,6 +171,10 @@ ATF_TC_BODY(snprintf_wN, tc)
SNPRINTF_TEST("wd", "%wd", 0);
SNPRINTF_TEST("w1d", "%w1d", 0);
SNPRINTF_TEST("w128d", "%w128d", 0);
+
+ SNPRINTF_TEST(" 1", "%1$*2$w16d", (int16_t)1, 2);
+ SNPRINTF_TEST(" 1", "%1$*2$w32d", (int32_t)1, 2);
+ SNPRINTF_TEST(" 1", "%1$*2$w64d", (int64_t)1, 2);
}
ATF_TC_WITHOUT_HEAD(snprintf_wfN);
@@ -203,6 +207,10 @@ ATF_TC_BODY(snprintf_wfN, tc)
SNPRINTF_TEST("wfd", "%wfd", 0);
SNPRINTF_TEST("wf1d", "%wf1d", 0);
SNPRINTF_TEST("wf128d", "%wf128d", 0);
+
+ SNPRINTF_TEST(" 1", "%1$*2$w16d", (int_fast16_t)1, 2);
+ SNPRINTF_TEST(" 1", "%1$*2$w32d", (int_fast32_t)1, 2);
+ SNPRINTF_TEST(" 1", "%1$*2$w64d", (int_fast64_t)1, 2);
}
ATF_TP_ADD_TCS(tp)
diff --git a/lib/libc/tests/stdio/swprintf_test.c b/lib/libc/tests/stdio/swprintf_test.c
index 5d9c60fb9ee7..6f3d56657f4c 100644
--- a/lib/libc/tests/stdio/swprintf_test.c
+++ b/lib/libc/tests/stdio/swprintf_test.c
@@ -172,6 +172,10 @@ ATF_TC_BODY(swprintf_wN, tc)
SWPRINTF_TEST("wd", "%wd", 0);
SWPRINTF_TEST("w1d", "%w1d", 0);
SWPRINTF_TEST("w128d", "%w128d", 0);
+
+ SWPRINTF_TEST(" 1", "%1$*2$w16d", (int16_t)1, 2);
+ SWPRINTF_TEST(" 1", "%1$*2$w32d", (int32_t)1, 2);
+ SWPRINTF_TEST(" 1", "%1$*2$w64d", (int64_t)1, 2);
}
ATF_TC_WITHOUT_HEAD(swprintf_wfN);
@@ -204,6 +208,10 @@ ATF_TC_BODY(swprintf_wfN, tc)
SWPRINTF_TEST("wfd", "%wfd", 0);
SWPRINTF_TEST("wf1d", "%wf1d", 0);
SWPRINTF_TEST("wf128d", "%wf128d", 0);
+
+ SWPRINTF_TEST(" 1", "%1$*2$w16d", (int_fast16_t)1, 2);
+ SWPRINTF_TEST(" 1", "%1$*2$w32d", (int_fast32_t)1, 2);
+ SWPRINTF_TEST(" 1", "%1$*2$w64d", (int_fast64_t)1, 2);
}
ATF_TP_ADD_TCS(tp)