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
14
14
15
15
#if os(Windows)
16
16
import Foundation
17
- import WinSDK. core . sysinfo
17
+ import WinSDK
18
18
#endif
19
19
20
20
@_implementationOnly import TSCclibc
Original file line number Diff line number Diff line change @@ -148,8 +148,17 @@ class ProcessTests: XCTestCase {
148
148
149
149
""" )
150
150
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
+
151
159
try withCustomEnv ( [ " PATH " : tmpdir. pathString] ) {
152
160
XCTAssertNotNil ( Process . findExecutable ( " program.bat " ) )
161
+ XCTAssertNil ( Process . findExecutable ( " program.bc " ) )
153
162
}
154
163
}
155
164
#endif
You can’t perform that action at this time.
0 commit comments