aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_suite.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_suite.cpp b/test/test_suite.cpp
index 3ecac5f..05b95f7 100644
--- a/test/test_suite.cpp
+++ b/test/test_suite.cpp
@@ -990,6 +990,12 @@ TEST_CASE("float", "[]" ) {
test::sprintf(buffer, "%.1f", 3.49);
REQUIRE(!strcmp(buffer, "3.5"));
+ test::sprintf(buffer, "a%-5.1f", 0.5);
+ REQUIRE(!strcmp(buffer, "a0.5 "));
+
+ test::sprintf(buffer, "a%-5.1fend", 0.5);
+ REQUIRE(!strcmp(buffer, "a0.5 end"));
+
// out of range in the moment, need to be fixed by someone
test::sprintf(buffer, "%.1f", 1E20);
REQUIRE(!strcmp(buffer, ""));