summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/unittests/ADT/StringExtrasTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/unittests/ADT/StringExtrasTest.cpp b/llvm/unittests/ADT/StringExtrasTest.cpp
index 7bcdaf62fe5..87a4c2a389f 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&amp;&lt;&gt;&quot;&apos;", OS.str());
+}
OpenPOWER on IntegriCloud