Manuel Klimek | 35fa265 | 2012-04-09 19:10:04 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
| 2 | // RUN: mkdir %t |
NAKAMURA Takumi | 2e8124b | 2012-05-23 22:24:27 +0000 | [diff] [blame] | 3 | // RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %t/test.cpp\",\"file\":\"%t/test.cpp\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json |
Manuel Klimek | 35fa265 | 2012-04-09 19:10:04 +0000 | [diff] [blame] | 4 | // RUN: cp "%s" "%t/test.cpp" |
Rafael Espindola | c7367ff | 2013-08-10 01:40:10 +0000 | [diff] [blame] | 5 | // RUN: ln -sf %t %t.foobar |
| 6 | // RUN: cd %t |
Nico Weber | 1f1703f | 2019-10-14 01:41:56 +0000 | [diff] [blame] | 7 | // RUN: env PWD="%t.foobar" not clang-check -p "%t" "test.cpp" 2>&1|FileCheck %s |
Manuel Klimek | 35fa265 | 2012-04-09 19:10:04 +0000 | [diff] [blame] | 8 | // FIXME: Make the above easier. |
| 9 | |
Manuel Klimek | 1baf89e | 2012-04-10 12:12:33 +0000 | [diff] [blame] | 10 | // CHECK: C++ requires |
Rafael Espindola | c7367ff | 2013-08-10 01:40:10 +0000 | [diff] [blame] | 11 | // CHECK: .foobar/test.cpp |
Manuel Klimek | 1baf89e | 2012-04-10 12:12:33 +0000 | [diff] [blame] | 12 | invalid; |
Manuel Klimek | 35fa265 | 2012-04-09 19:10:04 +0000 | [diff] [blame] | 13 | |
NAKAMURA Takumi | fe3fa78 | 2012-05-16 17:37:56 +0000 | [diff] [blame] | 14 | // REQUIRES: shell |