feat: add Process.version static method exposing WREN_VERSION_STRING
Implement a new `Process.version` foreign static method that returns the Wren version string. The C implementation uses `wrenSetSlotString` with the `WREN_VERSION_STRING` macro, and the Wren binding registers it alongside existing `Process` methods. A new test file validates the returned value is a non-empty string composed of dot-separated numeric segments.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import "os" for Process
|
||||
|
||||
System.print(Process.version is String) // expect: true
|
||||
System.print(Process.version.isEmpty) // expect: false
|
||||
|
||||
var isNumber = Fn.new {|str| Num.fromString(str) != null }
|
||||
System.print(Process.version.split(".").all(isNumber)) // expect: true
|
||||
Reference in New Issue
Block a user