blob: fe2e1e98e625516fca9959e512d2712f7e24e384 [file] [log] [blame]
Manuel Klimek35fa2652012-04-09 19:10:04 +00001// RUN: rm -rf %t
2// RUN: mkdir %t
NAKAMURA Takumi2e8124b2012-05-23 22:24:27 +00003// RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %t/test.cpp\",\"file\":\"%t/test.cpp\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json
Manuel Klimek35fa2652012-04-09 19:10:04 +00004// RUN: cp "%s" "%t/test.cpp"
Rafael Espindolac7367ff2013-08-10 01:40:10 +00005// RUN: ln -sf %t %t.foobar
6// RUN: cd %t
Nico Weber1f1703f2019-10-14 01:41:56 +00007// RUN: env PWD="%t.foobar" not clang-check -p "%t" "test.cpp" 2>&1|FileCheck %s
Manuel Klimek35fa2652012-04-09 19:10:04 +00008// FIXME: Make the above easier.
9
Manuel Klimek1baf89e2012-04-10 12:12:33 +000010// CHECK: C++ requires
Rafael Espindolac7367ff2013-08-10 01:40:10 +000011// CHECK: .foobar/test.cpp
Manuel Klimek1baf89e2012-04-10 12:12:33 +000012invalid;
Manuel Klimek35fa2652012-04-09 19:10:04 +000013
NAKAMURA Takumife3fa782012-05-16 17:37:56 +000014// REQUIRES: shell