xref: /llvm-project/clang/test/CodeCompletion/included-symlinks.cpp (revision cf9b25e0adc42546e4dc5ff51ee8674d45bac26b)
1 // REQUIRES: shell
2 // RUN: rm -rf %t && mkdir -p %t/real/myproj && mkdir -p %t/links
3 // RUN: touch %t/real/foo.h && ln -s %t/real/foo.h %t/links/foo.h
4 // RUN: touch %t/real/foobar.h && ln -s %t/real/foobar.h %t/links/foobar.h
5 // RUN: touch %t/real/myproj/test.h && ln -s %t/real/myproj %t/links/myproj
6 
7 // Suggest symlinked header files.
8 #include "foo.h"
9 // RUN: %clang -fsyntax-only -I%t/links -Xclang -code-completion-at=%s:%(line-1):13 %s | FileCheck -check-prefix=CHECK-1 %s
10 // CHECK-1: foo.h"
11 // CHECK-1: foobar.h"
12 
13 // Suggest symlinked folder.
14 #include "mypr"
15 // RUN: %clang -fsyntax-only -I%t/links -Xclang -code-completion-at=%s:%(line-1):13 %s | FileCheck -check-prefix=CHECK-2 %s
16 // CHECK-2: myproj/
17