1*f4a2713aSLionel Sambuc// Note: the run lines follow their respective tests, since line/column 2*f4a2713aSLionel Sambuc// matter in this test. 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambucconst char *in_string = "string"; 5*f4a2713aSLionel Sambucchar in_char = 'a'; 6*f4a2713aSLionel Sambuc// in comment 7*f4a2713aSLionel Sambuc/* in comment */ 8*f4a2713aSLionel Sambuc#warning blarg 9*f4a2713aSLionel Sambuc#error blarg 10*f4a2713aSLionel Sambuc#pragma mark this is the spot 11*f4a2713aSLionel Sambuc// RUN: c-index-test -code-completion-at=%s:4:32 %s > %t 12*f4a2713aSLionel Sambuc// RUN: echo "DONE" >> %t 13*f4a2713aSLionel Sambuc// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t 14*f4a2713aSLionel Sambuc// CHECK-CC1: Completion contexts: 15*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: Natural language 16*f4a2713aSLionel Sambuc// CHECK-CC1-NEXT: DONE 17*f4a2713aSLionel Sambuc// RUN: c-index-test -code-completion-at=%s:5:18 %s > %t 18*f4a2713aSLionel Sambuc// RUN: echo "DONE" >> %t 19*f4a2713aSLionel Sambuc// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t 20*f4a2713aSLionel Sambuc// RUN: c-index-test -code-completion-at=%s:6:7 %s > %t 21*f4a2713aSLionel Sambuc// RUN: echo "DONE" >> %t 22*f4a2713aSLionel Sambuc// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t 23*f4a2713aSLionel Sambuc// RUN: c-index-test -code-completion-at=%s:7:7 %s > %t 24*f4a2713aSLionel Sambuc// RUN: echo "DONE" >> %t 25*f4a2713aSLionel Sambuc// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t 26*f4a2713aSLionel Sambuc// RUN: c-index-test -code-completion-at=%s:8:10 %s > %t 27*f4a2713aSLionel Sambuc// RUN: echo "DONE" >> %t 28*f4a2713aSLionel Sambuc// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t 29*f4a2713aSLionel Sambuc// RUN: c-index-test -code-completion-at=%s:9:9 %s > %t 30*f4a2713aSLionel Sambuc// RUN: echo "DONE" >> %t 31*f4a2713aSLionel Sambuc// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t 32*f4a2713aSLionel Sambuc// RUN: c-index-test -code-completion-at=%s:10:19 %s > %t 33*f4a2713aSLionel Sambuc// RUN: echo "DONE" >> %t 34*f4a2713aSLionel Sambuc// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t 35*f4a2713aSLionel Sambuc 36*f4a2713aSLionel Sambuc// Same tests as above, but with completion caching. 37*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:4:32 %s > %t 38*f4a2713aSLionel Sambuc// RUN: echo "DONE" >> %t 39*f4a2713aSLionel Sambuc// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t 40*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:5:18 %s > %t 41*f4a2713aSLionel Sambuc// RUN: echo "DONE" >> %t 42*f4a2713aSLionel Sambuc// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t 43*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:6:7 %s > %t 44*f4a2713aSLionel Sambuc// RUN: echo "DONE" >> %t 45*f4a2713aSLionel Sambuc// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t 46*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:7:7 %s > %t 47*f4a2713aSLionel Sambuc// RUN: echo "DONE" >> %t 48*f4a2713aSLionel Sambuc// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t 49*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:8:10 %s > %t 50*f4a2713aSLionel Sambuc// RUN: echo "DONE" >> %t 51*f4a2713aSLionel Sambuc// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t 52*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:9:9 %s > %t 53*f4a2713aSLionel Sambuc// RUN: echo "DONE" >> %t 54*f4a2713aSLionel Sambuc// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t 55*f4a2713aSLionel Sambuc// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:10:19 %s > %t 56*f4a2713aSLionel Sambuc// RUN: echo "DONE" >> %t 57*f4a2713aSLionel Sambuc// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t 58