summaryrefslogtreecommitdiffstats
path: root/test/Frontend/dependency-gen.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Frontend/dependency-gen.c')
-rw-r--r--test/Frontend/dependency-gen.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/test/Frontend/dependency-gen.c b/test/Frontend/dependency-gen.c
index 0f8adab..49d3f28 100644
--- a/test/Frontend/dependency-gen.c
+++ b/test/Frontend/dependency-gen.c
@@ -1,19 +1,27 @@
-// rdar://6533411
-// RUN: %clang -MD -MF %t.d -S -x c -o %t.o %s
-// RUN: grep '.*dependency-gen.*:' %t.d
-// RUN: grep 'dependency-gen.c' %t.d
-
-// RUN: %clang -S -M -x c %s -o %t.d
-// RUN: grep '.*dependency-gen.*:' %t.d
-// RUN: grep 'dependency-gen.c' %t.d
-
-// PR8974
// REQUIRES: shell
-// "cd %t.dir" requires shell.
+// Basic test
// RUN: rm -rf %t.dir
// RUN: mkdir -p %t.dir/a/b
// RUN: echo > %t.dir/a/b/x.h
// RUN: cd %t.dir
-// RUN: %clang -include a/b/x.h -MD -MF %t.d -S -x c -o %t.o %s
-// RUN: grep ' a/b/x\.h' %t.d
+// RUN: %clang -MD -MF - %s -fsyntax-only -I a/b | FileCheck -check-prefix=CHECK-ONE %s
+// CHECK-ONE: {{ }}a/b/x.h
+
+// PR8974 (-include flag)
+// RUN: %clang -MD -MF - %s -fsyntax-only -include a/b/x.h -DINCLUDE_FLAG_TEST | FileCheck -check-prefix=CHECK-TWO %s
+// CHECK-TWO: {{ }}a/b/x.h
+
+// rdar://problem/9734352 (paths involving ".")
+// RUN: %clang -MD -MF - %s -fsyntax-only -I ./a/b | FileCheck -check-prefix=CHECK-THREE %s
+// CHECK-THREE: {{ }}a/b/x.h
+// RUN: %clang -MD -MF - %s -fsyntax-only -I .//./a/b/ | FileCheck -check-prefix=CHECK-FOUR %s
+// CHECK-FOUR: {{ }}a/b/x.h
+// RUN: %clang -MD -MF - %s -fsyntax-only -I a/b/. | FileCheck -check-prefix=CHECK-FIVE %s
+// CHECK-FIVE: {{ }}a/b/./x.h
+// RUN: cd a/b
+// RUN: %clang -MD -MF - %s -fsyntax-only -I ./ | FileCheck -check-prefix=CHECK-SIX %s
+// CHECK-SIX: {{ }}x.h
+#ifndef INCLUDE_FLAG_TEST
+#include <x.h>
+#endif
OpenPOWER on IntegriCloud