1
0
forked from Mirror/wren
Files
wren/test/process/all_arguments.wren
Bob Nystrom 71e2458a6c Add API for accessing command-line arguments.
- 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.
2016-01-22 07:57:26 -08:00

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.