Skip to content

Commit 4928856

Browse files
committed
Tests.
1 parent 4129a45 commit 4928856

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

TestFoundation/TestBundle.swift

+9
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)