r250629 - clang-format: Add test for (properly escaped) XML output.

Daniel Jasper via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 17 15:44:19 PDT 2015


Author: djasper
Date: Sat Oct 17 17:44:19 2015
New Revision: 250629

URL: http://llvm.org/viewvc/llvm-project?rev=250629&view=rev
Log:
clang-format: Add test for (properly escaped) XML output.

Added:
    cfe/trunk/test/Format/xmloutput.cpp

Added: cfe/trunk/test/Format/xmloutput.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Format/xmloutput.cpp?rev=250629&view=auto
==============================================================================
--- cfe/trunk/test/Format/xmloutput.cpp (added)
+++ cfe/trunk/test/Format/xmloutput.cpp Sat Oct 17 17:44:19 2015
@@ -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;




More information about the cfe-commits mailing list