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