feat: rename process module to os and add Platform class with name and isPosix methods
Rename the "process" module to "os" across all source files, documentation, tests, and build configuration. Add a new Platform class to the os module with static methods `name` (returns OS string like "Windows", "Linux", "OS X", "iOS", "Unix", "POSIX", or "Unknown") and `isPosix` (returns bool indicating POSIX compliance). Update all import paths from "process" to "os" in test files and module registrations. Move process.c/h to os.c/h, rename processSetArguments to osSetArguments, and regenerate the os.wren.inc bytecode source. Add documentation pages for the os module and Platform class.
2016-05-21 21:44:17 +02:00
|
|
|
import "os" for Platform
|
|
|
|
|
|
2021-04-28 23:45:50 +02:00
|
|
|
var platforms = [
|
|
|
|
|
"Windows",
|
|
|
|
|
"iOS",
|
|
|
|
|
"OS X",
|
|
|
|
|
"Unknown",
|
|
|
|
|
"Linux",
|
|
|
|
|
"Unix",
|
|
|
|
|
"POSIX"
|
|
|
|
|
]
|
|
|
|
|
|
feat: rename process module to os and add Platform class with name and isPosix methods
Rename the "process" module to "os" across all source files, documentation, tests, and build configuration. Add a new Platform class to the os module with static methods `name` (returns OS string like "Windows", "Linux", "OS X", "iOS", "Unix", "POSIX", or "Unknown") and `isPosix` (returns bool indicating POSIX compliance). Update all import paths from "process" to "os" in test files and module registrations. Move process.c/h to os.c/h, rename processSetArguments to osSetArguments, and regenerate the os.wren.inc bytecode source. Add documentation pages for the os module and Platform class.
2016-05-21 21:44:17 +02:00
|
|
|
// Can't test for certain values since this test is cross-platform, but we can
|
|
|
|
|
// at least make sure it is callable and returns a string.
|
|
|
|
|
System.print(Platform.name is String) // expect: true
|
2021-04-28 23:45:50 +02:00
|
|
|
System.print(platforms.contains(Platform.name)) // expect: true
|