]> granicus.if.org Git - clang/commitdiff
clang/test/Tooling: Tweak 4 tests to escape the path separator s/\\/\\\\/g in JSON.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 23 May 2012 22:24:27 +0000 (22:24 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 23 May 2012 22:24:27 +0000 (22:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157351 91177308-0d34-0410-b5e6-96231b3b80d8

test/Tooling/clang-check-builtin-headers.cpp
test/Tooling/clang-check-chdir.cpp
test/Tooling/clang-check-pwd.cpp
test/Tooling/clang-check.cpp

index 4324dec61b2e308e6331f6b7c389882fec65b6f1..fda68ccbc0767831aeaffcd14caee39dca1fc503 100644 (file)
@@ -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
index 5d02c95fabdeb2893d332c5a4c98ccfdf5315c8b..d9f172848b4c2c8eb6754e81316343abef367458 100644 (file)
@@ -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
index 96417df27954df24e3d3e45aa8e0d7ef1d44f0e7..8dd9e6e926dabee60e7ddcef312b74a93fd6af1c 100644 (file)
@@ -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
index d197078805d1d1b20241dda4dc96f15b53d011af..ff90b8841738ad69031f6d191187718d782e0be3 100644 (file)
@@ -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