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 @@ -421,6 +421,8 @@ std::string quote(StringRef unquoted) {
421421 for (const auto ch : unquoted) {
422422 if (ch == ' \\ ' )
423423 os << ' \\ ' ;
424+ if (ch == ' "' )
425+ os << ' \\ ' ;
424426 os << ch;
425427 }
426428 return buffer.str ().str ();
Original file line number Diff line number Diff line change 1414// 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
1515
1616// 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
1919
2020// REQUIRES: executable_test
2121// REQUIRES: objc_interop
@@ -25,8 +25,7 @@ import Metal
2525// Ensure the dependency on Darwin is captured even though it is a placeholder
2626
2727// CHECK: "modulePath": "{{.*}}{{/|\\}}Metal-{{.*}}.swiftmodule",
28- // CHECK-NEXT: "sourceFiles": [
29- // CHECK-NEXT: ],
28+ // CHECK: "directDependencies": [
3029// CHECK: {
3130// CHECK: "swiftPlaceholder": "Darwin"
3231// 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