aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_suite.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test_suite.cpp b/test/test_suite.cpp
index 05b95f7..e693851 100644
--- a/test/test_suite.cpp
+++ b/test/test_suite.cpp
@@ -1226,6 +1226,9 @@ TEST_CASE("misc", "[]" ) {
test::sprintf(buffer, "%.*f", 2, 0.33333333);
REQUIRE(!strcmp(buffer, "0.33"));
+ test::sprintf(buffer, "%.*d", -1, 1);
+ REQUIRE(!strcmp(buffer, "1"));
+
test::sprintf(buffer, "%.3s", "foobar");
REQUIRE(!strcmp(buffer, "foo"));