Skip to content

Commit 556d422

Browse files
committed
Minor patches
1 parent 740edef commit 556d422

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Sources/TSCBasic/Process.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import class Foundation.ProcessInfo
1212

1313
#if os(Windows)
1414
import Foundation
15-
import WinSDK.core.sysinfo
15+
import WinSDK
1616
#endif
1717

1818
@_implementationOnly import TSCclibc

Tests/TSCBasicTests/ProcessTests.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)