@@ -48,22 +48,22 @@ class APIDigesterTests: XCTestCase {
48
48
do {
49
49
var driver = try Driver ( args: [ " swiftc " , " foo.swift " , " -emit-module " , " -emit-digester-baseline " ] )
50
50
let digesterJob = try XCTUnwrap ( driver. planBuild ( ) . first { $0. kind == . generateAPIBaseline } )
51
- XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -o " , . path ( . relative ( try . init ( validating : " foo.api.json " ) ) ) ] ) )
51
+ XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -o " , try toPathOption ( " foo.api.json " ) ] ) )
52
52
}
53
53
do {
54
54
var driver = try Driver ( args: [ " swiftc " , " foo.swift " , " -emit-module " , " -emit-module-interface " , " -enable-library-evolution " , " -emit-digester-baseline " , " -digester-mode " , " abi " ] )
55
55
let digesterJob = try XCTUnwrap ( driver. planBuild ( ) . first { $0. kind == . generateABIBaseline } )
56
- XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -o " , . path ( . relative ( try . init ( validating : " foo.abi.json " ) ) ) ] ) )
56
+ XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -o " , try toPathOption ( " foo.abi.json " ) ] ) )
57
57
}
58
58
do {
59
59
var driver = try Driver ( args: [ " swiftc " , " foo.swift " , " -emit-module " , " -emit-digester-baseline-path " , " bar.api.json " ] )
60
60
let digesterJob = try XCTUnwrap ( driver. planBuild ( ) . first { $0. kind == . generateAPIBaseline } )
61
- XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -o " , . path ( . relative ( try . init ( validating : " bar.api.json " ) ) ) ] ) )
61
+ XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -o " , try toPathOption ( " bar.api.json " ) ] ) )
62
62
}
63
63
do {
64
64
var driver = try Driver ( args: [ " swiftc " , " foo.swift " , " -emit-module " , " -emit-module-interface " , " -enable-library-evolution " , " -digester-mode " , " abi " , " -emit-digester-baseline-path " , " bar.abi.json " ] )
65
65
let digesterJob = try XCTUnwrap ( driver. planBuild ( ) . first { $0. kind == . generateABIBaseline } )
66
- XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -o " , . path ( . relative ( try . init ( validating : " bar.abi.json " ) ) ) ] ) )
66
+ XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -o " , try toPathOption ( " bar.abi.json " ) ] ) )
67
67
}
68
68
do {
69
69
try withTemporaryDirectory { path in
@@ -148,11 +148,11 @@ class APIDigesterTests: XCTestCase {
148
148
let digesterJob = try XCTUnwrap ( driver. planBuild ( ) . first { $0. kind == . generateAPIBaseline } )
149
149
XCTAssertTrue ( digesterJob. commandLine. contains ( " -dump-sdk " ) )
150
150
XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -module " , " foo " ] ) )
151
- XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -I " , . path ( . relative ( try . init ( validating : " . " ) ) ) ] ) )
151
+ XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -I " , try toPathOption ( " . " ) ] ) )
152
152
XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -sdk " , . path( . absolute( try . init( validating: " /path/to/sdk " ) ) ) ] ) )
153
153
XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -I " , . path( . absolute( try . init( validating: " /some/path " ) ) ) ] ) )
154
- XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -F " , . path ( . relative ( try . init ( validating : " framework/path " ) ) ) ] ) )
155
- XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -o " , . path ( . relative ( try . init ( validating : " foo.api.json " ) ) ) ] ) )
154
+ XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -F " , try toPathOption ( " framework/path " ) ] ) )
155
+ XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -o " , try toPathOption ( " foo.api.json " ) ] ) )
156
156
157
157
XCTAssertFalse ( digesterJob. commandLine. contains ( " -abi " ) )
158
158
}
@@ -164,11 +164,11 @@ class APIDigesterTests: XCTestCase {
164
164
let digesterJob = try XCTUnwrap ( driver. planBuild ( ) . first { $0. kind == . generateABIBaseline } )
165
165
XCTAssertTrue ( digesterJob. commandLine. contains ( " -dump-sdk " ) )
166
166
XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -module " , " foo " ] ) )
167
- XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -I " , . path ( . relative ( try . init ( validating : " . " ) ) ) ] ) )
167
+ XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -I " , try toPathOption ( " . " ) ] ) )
168
168
XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -sdk " , . path( . absolute( try . init( validating: " /path/to/sdk " ) ) ) ] ) )
169
169
XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -I " , . path( . absolute( try . init( validating: " /some/path " ) ) ) ] ) )
170
- XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -F " , . path ( . relative ( try . init ( validating : " framework/path " ) ) ) ] ) )
171
- XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -o " , . path ( . relative ( try . init ( validating : " foo.abi.json " ) ) ) ] ) )
170
+ XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -F " , try toPathOption ( " framework/path " ) ] ) )
171
+ XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -o " , try toPathOption ( " foo.abi.json " ) ] ) )
172
172
173
173
XCTAssertTrue ( digesterJob. commandLine. contains ( " -abi " ) )
174
174
}
@@ -239,12 +239,12 @@ class APIDigesterTests: XCTestCase {
239
239
XCTAssertTrue ( digesterJob. commandLine. contains ( " -diagnose-sdk " ) )
240
240
XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -module " , " foo " ] ) )
241
241
XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -baseline-path " , . path( . absolute( try . init( validating: " /baseline/path " ) ) ) ] ) )
242
- XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -I " , . path ( . relative ( try . init ( validating : " . " ) ) ) ] ) )
242
+ XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -I " , try toPathOption ( " . " ) ] ) )
243
243
XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -sdk " , . path( . absolute( try . init( validating: " /path/to/sdk " ) ) ) ] ) )
244
244
XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -I " , . path( . absolute( try . init( validating: " /some/path " ) ) ) ] ) )
245
- XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -F " , . path ( . relative ( try . init ( validating : " framework/path " ) ) ) ] ) )
245
+ XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -F " , try toPathOption ( " framework/path " ) ] ) )
246
246
XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -breakage-allowlist-path " ,
247
- . path ( . relative ( try . init ( validating : " allowlist/path " ) ) ) ] ) )
247
+ try toPathOption ( " allowlist/path " ) ] ) )
248
248
249
249
XCTAssertFalse ( digesterJob. commandLine. contains ( " -abi " ) )
250
250
}
@@ -259,7 +259,7 @@ class APIDigesterTests: XCTestCase {
259
259
XCTAssertTrue ( digesterJob. commandLine. contains ( " -diagnose-sdk " ) )
260
260
XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -input-paths " , . path( . absolute( try . init( validating: " /baseline/path " ) ) ) ] ) )
261
261
XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence: [ " -breakage-allowlist-path " ,
262
- . path ( . relative ( try . init ( validating : " allowlist/path " ) ) ) ] ) )
262
+ try toPathOption ( " allowlist/path " ) ] ) )
263
263
XCTAssertTrue ( digesterJob. commandLine. contains ( " -abi " ) )
264
264
XCTAssertTrue ( digesterJob. commandLine. contains ( " -serialize-diagnostics-path " ) )
265
265
}
0 commit comments