summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils/stringutils_unittest.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/utils/stringutils_unittest.cc b/src/utils/stringutils_unittest.cc
index 9860d90c7..a866e68b6 100644
--- a/src/utils/stringutils_unittest.cc
+++ b/src/utils/stringutils_unittest.cc
@@ -132,6 +132,24 @@ TEST_CASE("stringuntils toString 1")
REQUIRE(strprintf("%d", 123) == toString(CAST_U8(123)));
}
+TEST_CASE("stringuntils strprintf 1")
+{
+ REQUIRE(strprintf("%s very long string. 123456789012345678901234567890"
+ "+++++++++++++++++++++++++++++++++++++++"
+ "________________________________"
+ "***********************************"
+ "----------------------------------------"
+ "|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| %s",
+ "test", "end of test") ==
+ "test very long string. 123456789012345678901234567890"
+ "+++++++++++++++++++++++++++++++++++++++"
+ "________________________________"
+ "***********************************"
+ "----------------------------------------"
+ "|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| "
+ "end of test");
+}
+
TEST_CASE("stringuntils toString 2")
{
for (int f = 0; f < 10000000; f += 123)