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
1212
1313#if os(Windows)
1414import Foundation
15- import WinSDK. core . sysinfo
15+ import WinSDK
1616#endif
1717
1818@_implementationOnly import TSCclibc
Original file line number Diff line number Diff line change @@ -111,8 +111,17 @@ class ProcessTests: XCTestCase {
111111
112112 """ )
113113
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+
114122 try withCustomEnv ( [ " PATH " : tmpdir. pathString] ) {
115123 XCTAssertNotNil ( Process . findExecutable ( " program.bat " ) )
124+ XCTAssertNil ( Process . findExecutable ( " program.bc " ) )
116125 }
117126 }
118127 #endif
You can’t perform that action at this time.
0 commit comments