File tree Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -413,6 +413,8 @@ std::string quote(StringRef unquoted) {
413
413
for (const auto ch : unquoted) {
414
414
if (ch == ' \\ ' )
415
415
os << ' \\ ' ;
416
+ if (ch == ' "' )
417
+ os << ' \\ ' ;
416
418
os << ch;
417
419
}
418
420
return buffer.str ().str ();
Original file line number Diff line number Diff line change 14
14
// RUN: %target-swift-frontend -scan-dependencies -module-cache-path %t/clang-module-cache %s -placeholder-dependency-module-map-file %t/inputs/map.json -o %t/deps.json
15
15
16
16
// Check the contents of the JSON output
17
- // RUN: %validate-json %t/deps.json &>/dev/null
18
- // RUN: %FileCheck %s < %t/deps .json
17
+ // RUN: %validate-json %t/deps.json > %t/validated_deps.json
18
+ // RUN: %FileCheck %s < %t/validated_deps .json
19
19
20
20
// REQUIRES: executable_test
21
21
// REQUIRES: objc_interop
@@ -25,8 +25,7 @@ import Metal
25
25
// Ensure the dependency on Darwin is captured even though it is a placeholder
26
26
27
27
// CHECK: "modulePath": "{{.*}}{{/|\\}}Metal-{{.*}}.swiftmodule",
28
- // CHECK-NEXT: "sourceFiles": [
29
- // CHECK-NEXT: ],
28
+ // CHECK: "directDependencies": [
30
29
// CHECK: {
31
30
// CHECK: "swiftPlaceholder": "Darwin"
32
31
// CHECK: },
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %empty-directory(%t/module-cache)
3
+ // RUN: %empty-directory(%t/inputs)
4
+ // RUN: split-file %s %t
5
+ // RUN: %target-swift-frontend -scan-dependencies -module-cache-path %t/module-cache %t/test.swift -o %t/deps.json -I %t/inputs -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import
6
+ // RUN: %validate-json %t/deps.json > %t/validated_deps.json
7
+ // RUN: %FileCheck %s < %t/validated_deps.json
8
+
9
+ //--- inputs/Foo.swiftinterface
10
+ // swift-interface-format-version: 1.0
11
+ // swift-module-flags: -module-name Foo
12
+ // swift-module-flags-ignorable-private: -package-name "\"ManyFoos\""
13
+ public func foo( ) { }
14
+
15
+ //--- test.swift
16
+ import Foo
17
+
18
+ // CHECK: "-package-name"
19
+ // CHECK-NEXT: "\"ManyFoos\""
You can’t perform that action at this time.
0 commit comments