Use write_escaped_string to std::filesystem::path.

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
Vladislav Shchapov
2022-05-21 20:12:32 +05:00
committed by Victor Zverovich
parent 9860f67cde
commit 65dd2ea52c
2 changed files with 30 additions and 1 deletions

View File

@ -12,6 +12,8 @@
TEST(std_test, path) {
#ifdef __cpp_lib_filesystem
EXPECT_EQ(fmt::format("{:8}", std::filesystem::path("foo")), "\"foo\" ");
EXPECT_EQ(fmt::format("{}", std::filesystem::path("foo\"bar.txt")),
"\"foo\\\"bar.txt\"");
#endif
}