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 @@ -12,7 +12,7 @@ import class Foundation.ProcessInfo
12
12
13
13
#if os(Windows)
14
14
import Foundation
15
- import WinSDK. core . sysinfo
15
+ import WinSDK
16
16
#endif
17
17
18
18
@_implementationOnly import TSCclibc
Original file line number Diff line number Diff line change @@ -111,8 +111,17 @@ class ProcessTests: XCTestCase {
111
111
112
112
""" )
113
113
114
+ // Create a non-executable file to test.
115
+ let tempNonExecutable = tmpdir. appending ( component: " program.bc " )
116
+ try localFileSystem. writeFileContents ( tempNonExecutable, bytes: """
117
+ @echo off
118
+ exit
119
+
120
+ """ )
121
+
114
122
try withCustomEnv ( [ " PATH " : tmpdir. pathString] ) {
115
123
XCTAssertNotNil ( Process . findExecutable ( " program.bat " ) )
124
+ XCTAssertNil ( Process . findExecutable ( " program.bc " ) )
116
125
}
117
126
}
118
127
#endif
You can’t perform that action at this time.
0 commit comments