File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import var Foundation.NSLocalizedDescriptionKey
1414
1515#if os(Windows)
1616import Foundation
17- import WinSDK. core . sysinfo
17+ import WinSDK
1818#endif
1919
2020@_implementationOnly import TSCclibc
Original file line number Diff line number Diff line change @@ -148,8 +148,17 @@ class ProcessTests: XCTestCase {
148148
149149 """ )
150150
151+ // Create a non-executable file to test.
152+ let tempNonExecutable = tmpdir. appending ( component: " program.bc " )
153+ try localFileSystem. writeFileContents ( tempNonExecutable, bytes: """
154+ @echo off
155+ exit
156+
157+ """ )
158+
151159 try withCustomEnv ( [ " PATH " : tmpdir. pathString] ) {
152160 XCTAssertNotNil ( Process . findExecutable ( " program.bat " ) )
161+ XCTAssertNil ( Process . findExecutable ( " program.bc " ) )
153162 }
154163 }
155164 #endif
You can’t perform that action at this time.
0 commit comments