From 73af60ade38782a7e49b7ce2f3546ec81c7bb343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Mon, 4 May 2020 22:04:45 -0700 Subject: [PATCH] Updated vsnprintf tests. --- tests/vsnprintf_test.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/vsnprintf_test.cpp b/tests/vsnprintf_test.cpp index a7be774..04112da 100644 --- a/tests/vsnprintf_test.cpp +++ b/tests/vsnprintf_test.cpp @@ -195,6 +195,12 @@ TEST_CASE("vsnprintf") REQUIRE(test("hello ", "%-20s", "hello") ); REQUIRE(test("hello, world!", "%s, %s!", "hello", "world") ); + REQUIRE(test("h", "%1s", "hello") ); + REQUIRE(test("he", "%2s", "hello") ); + REQUIRE(test("hel", "%3s", "hello") ); + REQUIRE(test("hell", "%4s", "hello") ); + REQUIRE(test("hello", "%5s", "hello") ); + bx::StringView str("0hello1world2"); bx::StringView hello(str, 1, 5); bx::StringView world(str, 7, 5);