@@ -48,22 +48,22 @@ class APIDigesterTests: XCTestCase {
4848    do  { 
4949      var  driver  =  try Driver ( args:  [ " swiftc " ,  " foo.swift " ,  " -emit-module " ,  " -emit-digester-baseline " ] ) 
5050      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 " ) ] ) ) 
5252    } 
5353    do  { 
5454      var  driver  =  try Driver ( args:  [ " swiftc " ,  " foo.swift " ,  " -emit-module " , " -emit-module-interface " ,  " -enable-library-evolution " ,  " -emit-digester-baseline " ,  " -digester-mode " ,  " abi " ] ) 
5555      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 " ) ] ) ) 
5757    } 
5858    do  { 
5959      var  driver  =  try Driver ( args:  [ " swiftc " ,  " foo.swift " ,  " -emit-module " ,  " -emit-digester-baseline-path " ,  " bar.api.json " ] ) 
6060      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 " ) ] ) ) 
6262    } 
6363    do  { 
6464      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 " ] ) 
6565      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 " ) ] ) ) 
6767    } 
6868    do  { 
6969      try withTemporaryDirectory  {  path in 
@@ -148,11 +148,11 @@ class APIDigesterTests: XCTestCase {
148148      let  digesterJob  =  try XCTUnwrap ( driver. planBuild ( ) . first  {  $0. kind ==  . generateAPIBaseline } ) 
149149      XCTAssertTrue ( digesterJob. commandLine. contains ( " -dump-sdk " ) ) 
150150      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 ( " . " ) ] ) ) 
152152      XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence:  [ " -sdk " ,  . path( . absolute( try . init( validating:  " /path/to/sdk " ) ) ) ] ) ) 
153153      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 " ) ] ) ) 
156156
157157      XCTAssertFalse ( digesterJob. commandLine. contains ( " -abi " ) ) 
158158    } 
@@ -164,11 +164,11 @@ class APIDigesterTests: XCTestCase {
164164      let  digesterJob  =  try XCTUnwrap ( driver. planBuild ( ) . first  {  $0. kind ==  . generateABIBaseline } ) 
165165      XCTAssertTrue ( digesterJob. commandLine. contains ( " -dump-sdk " ) ) 
166166      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 ( " . " ) ] ) ) 
168168      XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence:  [ " -sdk " ,  . path( . absolute( try . init( validating:  " /path/to/sdk " ) ) ) ] ) ) 
169169      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 " ) ] ) ) 
172172
173173      XCTAssertTrue ( digesterJob. commandLine. contains ( " -abi " ) ) 
174174    } 
@@ -239,12 +239,12 @@ class APIDigesterTests: XCTestCase {
239239      XCTAssertTrue ( digesterJob. commandLine. contains ( " -diagnose-sdk " ) ) 
240240      XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence:  [ " -module " ,  " foo " ] ) ) 
241241      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 ( " . " ) ] ) ) 
243243      XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence:  [ " -sdk " ,  . path( . absolute( try . init( validating:  " /path/to/sdk " ) ) ) ] ) ) 
244244      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 " ) ] ) ) 
246246      XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence:  [ " -breakage-allowlist-path " , 
247-                                                                    . path ( . relative ( try . init ( validating :   " allowlist/path " ) ) ) ] ) ) 
247+                                                                    try toPathOption ( " allowlist/path " ) ] ) ) 
248248
249249      XCTAssertFalse ( digesterJob. commandLine. contains ( " -abi " ) ) 
250250    } 
@@ -259,7 +259,7 @@ class APIDigesterTests: XCTestCase {
259259      XCTAssertTrue ( digesterJob. commandLine. contains ( " -diagnose-sdk " ) ) 
260260      XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence:  [ " -input-paths " ,  . path( . absolute( try . init( validating:  " /baseline/path " ) ) ) ] ) ) 
261261      XCTAssertTrue ( digesterJob. commandLine. contains ( subsequence:  [ " -breakage-allowlist-path " , 
262-                                                                    . path ( . relative ( try . init ( validating :   " allowlist/path " ) ) ) ] ) ) 
262+                                                                    try toPathOption ( " allowlist/path " ) ] ) ) 
263263      XCTAssertTrue ( digesterJob. commandLine. contains ( " -abi " ) ) 
264264      XCTAssertTrue ( digesterJob. commandLine. contains ( " -serialize-diagnostics-path " ) ) 
265265    } 
0 commit comments