[cfe-commits] r157351 - in /cfe/trunk/test/Tooling: clang-check-builtin-headers.cpp clang-check-chdir.cpp clang-check-pwd.cpp clang-check.cpp

NAKAMURA Takumi geek4civic at gmail.com
Wed May 23 15:24:27 PDT 2012


Author: chapuni
Date: Wed May 23 17:24:27 2012
New Revision: 157351

URL: http://llvm.org/viewvc/llvm-project?rev=157351&view=rev
Log:
clang/test/Tooling: Tweak 4 tests to escape the path separator s/\\/\\\\/g in JSON.

Modified:
    cfe/trunk/test/Tooling/clang-check-builtin-headers.cpp
    cfe/trunk/test/Tooling/clang-check-chdir.cpp
    cfe/trunk/test/Tooling/clang-check-pwd.cpp
    cfe/trunk/test/Tooling/clang-check.cpp

Modified: cfe/trunk/test/Tooling/clang-check-builtin-headers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Tooling/clang-check-builtin-headers.cpp?rev=157351&r1=157350&r2=157351&view=diff
==============================================================================
--- cfe/trunk/test/Tooling/clang-check-builtin-headers.cpp (original)
+++ cfe/trunk/test/Tooling/clang-check-builtin-headers.cpp Wed May 23 17:24:27 2012
@@ -1,7 +1,7 @@
 // RUN: rm -rf %t
 // RUN: mkdir %t
 // Add a path that doesn't exist as argv[0] for the compile command line:
-// RUN: echo '[{"directory":".","command":"/random/tool -c %t/test.cpp","file":"%t/test.cpp"}]' > %t/compile_commands.json
+// RUN: echo '[{"directory":".","command":"/random/tool -c %t/test.cpp","file":"%t/test.cpp"}]' | sed -e 's/\\/\//g' > %t/compile_commands.json
 // RUN: cp "%s" "%t/test.cpp"
 // RUN: clang-check "%t" "%t/test.cpp" 2>&1|FileCheck %s
 // FIXME: Make the above easier.
@@ -11,5 +11,5 @@
 // CHECK: C++ requires
 invalid;
 
-// FIXME: JSON doesn't like path separator '\', on Win32 hosts.
+// FIXME: This is incompatible to -fms-compatibility.
 // XFAIL: win32

Modified: cfe/trunk/test/Tooling/clang-check-chdir.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Tooling/clang-check-chdir.cpp?rev=157351&r1=157350&r2=157351&view=diff
==============================================================================
--- cfe/trunk/test/Tooling/clang-check-chdir.cpp (original)
+++ cfe/trunk/test/Tooling/clang-check-chdir.cpp Wed May 23 17:24:27 2012
@@ -2,7 +2,7 @@
 // compilation database.
 // RUN: rm -rf %t
 // RUN: mkdir %t
-// RUN: echo "[{\"directory\":\"%t\",\"command\":\"clang -c test.cpp -I.\",\"file\":\"%t/test.cpp\"}]" > %t/compile_commands.json
+// RUN: echo "[{\"directory\":\"%t\",\"command\":\"clang -c test.cpp -I.\",\"file\":\"%t/test.cpp\"}]" | sed -e 's/\\/\//g' > %t/compile_commands.json
 // RUN: cp "%s" "%t/test.cpp"
 // RUN: touch "%t/clang-check-test.h"
 // RUN: clang-check "%t" "%t/test.cpp" 2>&1|FileCheck %s
@@ -13,5 +13,5 @@
 // CHECK: C++ requires
 invalid;
 
-// FIXME: JSON doesn't like path separator '\', on Win32 hosts.
+// FIXME: This is incompatible to -fms-compatibility.
 // XFAIL: win32

Modified: cfe/trunk/test/Tooling/clang-check-pwd.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Tooling/clang-check-pwd.cpp?rev=157351&r1=157350&r2=157351&view=diff
==============================================================================
--- cfe/trunk/test/Tooling/clang-check-pwd.cpp (original)
+++ cfe/trunk/test/Tooling/clang-check-pwd.cpp Wed May 23 17:24:27 2012
@@ -1,6 +1,6 @@
 // RUN: rm -rf %t
 // RUN: mkdir %t
-// RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %t/test.cpp\",\"file\":\"%t/test.cpp\"}]" > %t/compile_commands.json
+// RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %t/test.cpp\",\"file\":\"%t/test.cpp\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json
 // RUN: cp "%s" "%t/test.cpp"
 // RUN: PWD="%t" clang-check "%t" "test.cpp" 2>&1|FileCheck %s
 // FIXME: Make the above easier.
@@ -9,4 +9,3 @@
 invalid;
 
 // REQUIRES: shell
-// XFAIL: mingw32

Modified: cfe/trunk/test/Tooling/clang-check.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Tooling/clang-check.cpp?rev=157351&r1=157350&r2=157351&view=diff
==============================================================================
--- cfe/trunk/test/Tooling/clang-check.cpp (original)
+++ cfe/trunk/test/Tooling/clang-check.cpp Wed May 23 17:24:27 2012
@@ -1,6 +1,6 @@
 // RUN: rm -rf %t
 // RUN: mkdir %t
-// RUN: echo '[{"directory":".","command":"clang++ -c %t/test.cpp","file":"%t/test.cpp"}]' > %t/compile_commands.json
+// RUN: echo '[{"directory":".","command":"clang++ -c %t/test.cpp","file":"%t/test.cpp"}]' | sed -e 's/\\/\//g' > %t/compile_commands.json
 // RUN: cp "%s" "%t/test.cpp"
 // RUN: clang-check "%t" "%t/test.cpp" 2>&1|FileCheck %s
 // FIXME: Make the above easier.
@@ -8,5 +8,5 @@
 // CHECK: C++ requires
 invalid;
 
-// FIXME: JSON doesn't like path separator '\', on Win32 hosts.
+// FIXME: This is incompatible to -fms-compatibility.
 // XFAIL: win32





More information about the cfe-commits mailing list