NAKAMURA Takumi | ef34d77 | 2011-02-28 09:41:07 +0000 | [diff] [blame] | 1 | // REQUIRES: shell |
Eli Friedman | a6e023c | 2011-07-08 20:17:28 +0000 | [diff] [blame] | 2 | // Basic test |
Chandler Carruth | 06efbd9 | 2011-02-23 23:52:14 +0000 | [diff] [blame] | 3 | // RUN: rm -rf %t.dir |
Chandler Carruth | 7acf454 | 2011-02-24 02:39:40 +0000 | [diff] [blame] | 4 | // RUN: mkdir -p %t.dir/a/b |
| 5 | // RUN: echo > %t.dir/a/b/x.h |
| 6 | // RUN: cd %t.dir |
Eli Friedman | a6e023c | 2011-07-08 20:17:28 +0000 | [diff] [blame] | 7 | // RUN: %clang -MD -MF - %s -fsyntax-only -I a/b | FileCheck -check-prefix=CHECK-ONE %s |
| 8 | // CHECK-ONE: {{ }}a/b/x.h |
Nick Lewycky | 277a6e7 | 2011-02-23 21:16:44 +0000 | [diff] [blame] | 9 | |
Eli Friedman | a6e023c | 2011-07-08 20:17:28 +0000 | [diff] [blame] | 10 | // PR8974 (-include flag) |
| 11 | // RUN: %clang -MD -MF - %s -fsyntax-only -include a/b/x.h -DINCLUDE_FLAG_TEST | FileCheck -check-prefix=CHECK-TWO %s |
| 12 | // CHECK-TWO: {{ }}a/b/x.h |
| 13 | |
| 14 | // rdar://problem/9734352 (paths involving ".") |
| 15 | // RUN: %clang -MD -MF - %s -fsyntax-only -I ./a/b | FileCheck -check-prefix=CHECK-THREE %s |
| 16 | // CHECK-THREE: {{ }}a/b/x.h |
| 17 | // RUN: %clang -MD -MF - %s -fsyntax-only -I .//./a/b/ | FileCheck -check-prefix=CHECK-FOUR %s |
| 18 | // CHECK-FOUR: {{ }}a/b/x.h |
| 19 | // RUN: %clang -MD -MF - %s -fsyntax-only -I a/b/. | FileCheck -check-prefix=CHECK-FIVE %s |
| 20 | // CHECK-FIVE: {{ }}a/b/./x.h |
| 21 | // RUN: cd a/b |
| 22 | // RUN: %clang -MD -MF - %s -fsyntax-only -I ./ | FileCheck -check-prefix=CHECK-SIX %s |
| 23 | // CHECK-SIX: {{ }}x.h |
| 24 | |
| 25 | #ifndef INCLUDE_FLAG_TEST |
| 26 | #include <x.h> |
| 27 | #endif |