clang-format: Add test for (properly escaped) XML output.
llvm-svn: 250629
diff --git a/clang/test/Format/xmloutput.cpp b/clang/test/Format/xmloutput.cpp
new file mode 100644
index 0000000..d3c5254
--- /dev/null
+++ b/clang/test/Format/xmloutput.cpp
@@ -0,0 +1,12 @@
+// RUN: clang-format -output-replacements-xml -sort-includes %s > %t.xml
+// RUN: FileCheck -strict-whitespace -input-file=%t.xml %s
+
+// CHECK: <?xml
+// CHECK-NEXT: {{<replacements.*incomplete_format='false'}}
+// CHECK-NEXT: {{<replacement.*#include <a> #include <b><}}
+// CHECK-NEXT: {{<replacement.*> <}}
+// CHECK-NEXT: {{<replacement.*> <}}
+#include <b>
+#include <a>
+
+int a;int*b;