mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-05 02:27:45 +00:00
Remove /source-charset:utf-8 compile option.
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
parent
eaa8efb950
commit
f0de128449
@ -78,9 +78,6 @@ add_fmt_test(printf-test)
|
||||
add_fmt_test(ranges-test ranges-odr-test.cc)
|
||||
add_fmt_test(scan-test)
|
||||
add_fmt_test(std-test)
|
||||
if (MSVC)
|
||||
target_compile_options(std-test PRIVATE /source-charset:utf-8)
|
||||
endif ()
|
||||
add_fmt_test(unicode-test HEADER_ONLY)
|
||||
if (MSVC)
|
||||
target_compile_options(unicode-test PRIVATE /utf-8)
|
||||
|
@ -16,8 +16,15 @@ TEST(std_test, path) {
|
||||
"\"foo\\\"bar.txt\"");
|
||||
|
||||
# ifdef _WIN32
|
||||
EXPECT_EQ(fmt::format("{}", std::filesystem::path(L"Файл.txt")),
|
||||
"\"\xd0\xa4\xd0\xb0\xd0\xb9\xd0\xbb.txt\"");
|
||||
// File.txt in Russian.
|
||||
const wchar_t unicode_path[] = {0x424, 0x430, 0x439, 0x43b, 0x2e,
|
||||
0x74, 0x78, 0x74, 0};
|
||||
const char unicode_u8path[] = {'"', char(0xd0), char(0xa4), char(0xd0),
|
||||
char(0xb0), char(0xd0), char(0xb9), char(0xd0),
|
||||
char(0xbb), '.', 't', 'x',
|
||||
't', '"', '\0'};
|
||||
EXPECT_EQ(fmt::format("{}", std::filesystem::path(unicode_path)),
|
||||
unicode_u8path);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user