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:
Victor Zverovich 2026-10-04 08:30:56 -07:00
parent 85a8f9117d
commit 3e0ecb247b

View File

@ -623,9 +623,6 @@ TEST(ranges_test, escape) {
// Correct utf-8.
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'}}),