File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,7 @@ class TestBundle : XCTestCase {
250250 ( " test_bundlePreflight " , test_bundlePreflight) ,
251251 ( " test_bundleFindExecutable " , test_bundleFindExecutable) ,
252252 ( " test_bundleFindAuxiliaryExecutables " , test_bundleFindAuxiliaryExecutables) ,
253+ ( " test_mainBundleExecutableURL " , test_mainBundleExecutableURL) ,
253254 ]
254255 }
255256
@@ -439,4 +440,12 @@ class TestBundle : XCTestCase {
439440 XCTAssertNil ( bundle. url ( forAuxiliaryExecutable: " does_not_exist_at_all " ) )
440441 }
441442 }
443+
444+ func test_mainBundleExecutableURL( ) {
445+ let maybeURL = Bundle . main. executableURL
446+ XCTAssertNotNil ( maybeURL)
447+ guard let url = maybeURL else { return }
448+
449+ XCTAssertEqual ( url. path, String ( cString: _CFProcessPath ( ) ) )
450+ }
442451}
You can’t perform that action at this time.
0 commit comments