@@ -2,6 +2,7 @@ import SomeModule
2
2
print ( someFunc ( ) )
3
3
4
4
// UNIT: Record | system | SomeModule |
5
+ // SKIP-NOT: Record | system | SomeModule |
5
6
6
7
// RUN: %empty-directory(%t)
7
8
//
@@ -43,6 +44,38 @@ print(someFunc())
43
44
//
44
45
// --- Check the index.
45
46
// RUN: c-index-test core -print-unit %t/idx | %FileCheck -check-prefix=UNIT %s
47
+ //
48
+ // --- Built with indexing, SomeModule is outside of the SDK so it's skipped.
49
+ // RUN: %empty-directory(%t/idx)
50
+ // RUN: %empty-directory(%t/modulecache)
51
+ // RUN: %target-swift-frontend \
52
+ // RUN: -typecheck \
53
+ // RUN: -index-system-modules \
54
+ // RUN: -index-ignore-stdlib \
55
+ // RUN: -index-store-path %t/idx \
56
+ // RUN: -sdk %t/NotTheActualSDK \
57
+ // RUN: -Fsystem %t/SDK/Frameworks \
58
+ // RUN: -module-cache-path %t/modulecache \
59
+ // RUN: %s
60
+ //
61
+ // --- Check the index.
62
+ // RUN: c-index-test core -print-unit %t/idx | %FileCheck -check-prefix=SKIP %s
63
+
64
+ // --- Built with indexing, without an SDK path SomeModule is indexed.
65
+ // RUN: %empty-directory(%t/idx)
66
+ // RUN: %empty-directory(%t/modulecache)
67
+ // RUN: %target-swift-frontend \
68
+ // RUN: -typecheck \
69
+ // RUN: -index-system-modules \
70
+ // RUN: -index-ignore-stdlib \
71
+ // RUN: -index-store-path %t/idx \
72
+ // RUN: -sdk "" \
73
+ // RUN: -Fsystem %t/SDK/Frameworks \
74
+ // RUN: -module-cache-path %t/modulecache \
75
+ // RUN: %s
76
+ //
77
+ // --- Check the index.
78
+ // RUN: c-index-test core -print-unit %t/idx | %FileCheck -check-prefix=UNIT %s
46
79
47
80
// -----------------------------------------------------------------------------
48
81
// --- Prepare SDK (.swiftinterface).
0 commit comments