forked from Mirror/wren
- Add process module with Process class. - Add "arguments" and "allArguments" methods. - Docs for same. - Support passing additional arguments to command line. - Add "--help" support to command line.
12 lines
394 B
Plaintext
12 lines
394 B
Plaintext
import "process" for Process
|
|
|
|
var args = Process.allArguments
|
|
System.print(args is List) // expect: true
|
|
System.print(args.count) // expect: 2
|
|
|
|
// Includes wren executable and file being run.
|
|
System.print(args[0].endsWith("wrend")) // expect: true
|
|
System.print(args[1]) // expect: test/process/all_arguments.wren
|
|
|
|
// TODO: Test passing additional args once we have an API to spawn a process.
|