summaryrefslogtreecommitdiffstats
path: root/clang/test/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-10-17 22:44:19 +0000
committerDaniel Jasper <djasper@google.com>2015-10-17 22:44:19 +0000
commit148f32925f8c30a282a4d2c03f11858bf1c72f54 (patch)
tree6a3b1a83c51353f11298836bcf668873097ef363 /clang/test/Format
parenta4f0988df555a274379a9a51be3de1859414e025 (diff)
downloadbcm5719-llvm-148f32925f8c30a282a4d2c03f11858bf1c72f54.tar.gz
bcm5719-llvm-148f32925f8c30a282a4d2c03f11858bf1c72f54.zip
clang-format: Add test for (properly escaped) XML output.
llvm-svn: 250629
Diffstat (limited to 'clang/test/Format')
-rw-r--r--clang/test/Format/xmloutput.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Format/xmloutput.cpp b/clang/test/Format/xmloutput.cpp
new file mode 100644
index 00000000000..d3c5254fc31
--- /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 &lt;a>&#10;#include &lt;b><}}
+// CHECK-NEXT: {{<replacement.*>&#10;<}}
+// CHECK-NEXT: {{<replacement.*> <}}
+#include <b>
+#include <a>
+
+int a;int*b;
OpenPOWER on IntegriCloud