diff --git a/llvm/unittests/ADT/StringExtrasTest.cpp b/llvm/unittests/ADT/StringExtrasTest.cpp index 7bcdaf62fe5a..87a4c2a389f1 100644 --- a/llvm/unittests/ADT/StringExtrasTest.cpp +++ b/llvm/unittests/ADT/StringExtrasTest.cpp @@ -92,3 +92,10 @@ TEST(StringExtrasTest, printLowerCase) { printLowerCase("ABCdefg01234.,&!~`'}\"", OS); EXPECT_EQ("abcdefg01234.,&!~`'}\"", OS.str()); } + +TEST(StringExtrasTest, PrintHTMLEscaped) { + std::string str; + raw_string_ostream OS(str); + PrintHTMLEscaped("ABCdef123&<>\"'", OS); + EXPECT_EQ("ABCdef123&<>"'", OS.str()); +}