mirror of
https://github.com/fmtlib/fmt.git
synced 2026-11-09 23:00:06 +08:00
Remove redundant escape tests
The U+1FAE0 and U+31350 cases added in #4962 duplicate the is_printable checks for the same code points. For a code point >= 0x80 needs_escape is exactly !is_printable(cp), and the existing U+1F984 case already covers a printable 4-byte sequence passing through unmodified.
This commit is contained in:
parent
85a8f9117d
commit
3e0ecb247b
@ -623,9 +623,6 @@ TEST(ranges_test, escape) {
|
|||||||
|
|
||||||
// Correct utf-8.
|
// Correct utf-8.
|
||||||
EXPECT_EQ(fmt::format("{}", vec{"🦄"}), "[\"🦄\"]");
|
EXPECT_EQ(fmt::format("{}", vec{"🦄"}), "[\"🦄\"]");
|
||||||
EXPECT_EQ(fmt::format("{}", vec{"🫠"}), "[\"🫠\"]");
|
|
||||||
EXPECT_EQ(fmt::format("{}", vec{"\xf0\xb1\x8d\x90"}),
|
|
||||||
"[\"\xf0\xb1\x8d\x90\"]");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPECT_EQ(fmt::format("{}", std::vector<std::vector<char>>{{'x'}}),
|
EXPECT_EQ(fmt::format("{}", std::vector<std::vector<char>>{{'x'}}),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user