blob: 49d3f28614c5d527ef71075ba26a7fd0619da5d1 [file] [log] [blame]
NAKAMURA Takumief34d772011-02-28 09:41:07 +00001// REQUIRES: shell
Eli Friedmana6e023c2011-07-08 20:17:28 +00002// Basic test
Chandler Carruth06efbd92011-02-23 23:52:14 +00003// RUN: rm -rf %t.dir
Chandler Carruth7acf4542011-02-24 02:39:40 +00004// RUN: mkdir -p %t.dir/a/b
5// RUN: echo > %t.dir/a/b/x.h
6// RUN: cd %t.dir
Eli Friedmana6e023c2011-07-08 20:17:28 +00007// RUN: %clang -MD -MF - %s -fsyntax-only -I a/b | FileCheck -check-prefix=CHECK-ONE %s
8// CHECK-ONE: {{ }}a/b/x.h
Nick Lewycky277a6e72011-02-23 21:16:44 +00009
Eli Friedmana6e023c2011-07-08 20:17:28 +000010// 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