File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Sources/_InternalTestSupport Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ This source file is part of the Swift.org open source project
3
+
4
+ Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors
5
+ Licensed under Apache License v2.0 with Runtime Library Exception
6
+
7
+ See http://swift.org/LICENSE.txt for license information
8
+ See http://swift.org/CONTRIBUTORS.txt for Swift project authors
9
+ */
10
+
11
+ public import Foundation
12
+
13
+ public enum OperatingSystem : Hashable , Sendable {
14
+ case macOS
15
+ case windows
16
+ case linux
17
+ case android
18
+ case unknown
19
+ }
20
+
21
+ extension ProcessInfo {
22
+ #if os(macOS)
23
+ public static let hostOperatingSystem = OperatingSystem . macOS
24
+ #elseif os(Linux)
25
+ public static let hostOperatingSystem = OperatingSystem . linux
26
+ #elseif os(Windows)
27
+ public static let hostOperatingSystem = OperatingSystem . windows
28
+ #else
29
+ public static let hostOperatingSystem = OperatingSystem . unknown
30
+ #endif
31
+
32
+ #if os(Windows)
33
+ public static let EOL = " \r \n "
34
+ #else
35
+ public static let EOL = " \n "
36
+ #endif
37
+
38
+ #if os(Windows)
39
+ public static let exeSuffix = " .exe "
40
+ #else
41
+ public static let exeSuffix = " "
42
+ #endif
43
+
44
+ #if os(Windows)
45
+ public static let batSuffix = " .bat "
46
+ #else
47
+ public static let batSuffix = " "
48
+ #endif
49
+ }
You can’t perform that action at this time.
0 commit comments