mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-06-22 00:20:18 +08:00
Add regression test for PR-266.
This commit is contained in:
parent
2f5aa9f13b
commit
cef1787ef8
@ -412,3 +412,19 @@ TEST_CASE("image-uri-spaces", "[issue-236]") {
|
|||||||
REQUIRE(true == ret);
|
REQUIRE(true == ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef TINYGLTF_NO_FS
|
||||||
|
TEST_CASE("expandpath-utf-8", "[pr-226]") {
|
||||||
|
|
||||||
|
std::string s1 = "\xe5\xaf\xb9"; // utf-8 string
|
||||||
|
|
||||||
|
std::string ret = tinygltf::ExpandFilePath(s1, /* userdata */nullptr);
|
||||||
|
|
||||||
|
// expected: E5 AF B9
|
||||||
|
REQUIRE(3 == ret.size());
|
||||||
|
|
||||||
|
REQUIRE(0xe5 == static_cast<uint8_t>(ret[0]));
|
||||||
|
REQUIRE(0xaf == static_cast<uint8_t>(ret[1]));
|
||||||
|
REQUIRE(0xb9 == static_cast<uint8_t>(ret[2]));
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user