Fixed vsnprintf.

This commit is contained in:
Branimir Karadžić
2018-10-25 17:57:33 -07:00
parent 7ad3cf4f89
commit 9bf79c70cc
4 changed files with 25 additions and 14 deletions

View File

@@ -164,4 +164,12 @@ TEST_CASE("vsnprintf", "")
REQUIRE(test("hello ", "%-20s", "hello") );
REQUIRE(test("hello, world!", "%s, %s!", "hello", "world") );
bx::StringView str("0hello1world2");
bx::StringView hello(str, 1, 5);
bx::StringView world(str, 7, 5);
REQUIRE(test("hello, world!", "%.*s, %.*s!"
, hello.getLength(), hello.getPtr()
, world.getLength(), world.getPtr()
) );
}