We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4129a45 commit 4928856Copy full SHA for 4928856
TestFoundation/TestBundle.swift
@@ -250,6 +250,7 @@ class TestBundle : XCTestCase {
250
("test_bundlePreflight", test_bundlePreflight),
251
("test_bundleFindExecutable", test_bundleFindExecutable),
252
("test_bundleFindAuxiliaryExecutables", test_bundleFindAuxiliaryExecutables),
253
+ ("test_mainBundleExecutableURL", test_mainBundleExecutableURL),
254
]
255
}
256
@@ -439,4 +440,12 @@ class TestBundle : XCTestCase {
439
440
XCTAssertNil(bundle.url(forAuxiliaryExecutable: "does_not_exist_at_all"))
441
442
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
+ }
451
0 commit comments