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; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits