Skip to content

Commit 93004ed

Browse files
Tests for utf16_native_endian_to_java_string
utf16_native_endian_to_java_string should not escape the ' character.
1 parent 9a66e75 commit 93004ed

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

unit/util/unicode.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,10 @@ TEST_CASE("unicode4", "[core][util][unicode]")
9393
const std::string s = u8"дȚȨɌṡʒʸͼἨѶݔݺ→⅒⅀▤▞╢◍⛳⻥龍ンㄗㄸ";
9494
REQUIRE(compare_utf8_to_utf16(s));
9595
}
96+
97+
TEST_CASE("utf16_native_endian_to_java_string", "[core][util][unicode]")
98+
{
99+
const std::wstring in = L"abc \" ' \\ub374 \\";
100+
REQUIRE(
101+
utf16_native_endian_to_java_string(in) == "abc \\\" \' \\\\ub374 \\\\");
102+
}

0 commit comments

Comments
 (0)