feat: add type validation for IO.read prompt and stdin support in test runner
Add string type check for IO.read() prompt argument with Fiber.abort on non-string input. Implement stdin piping in test runner via // stdin: comments, allowing tests to provide input lines. Update stack trace filtering to omit built-in library frames with empty source paths. Add io/read.wren and io/read_arg_not_string.wren test cases.
This commit is contained in:
@@ -80,6 +80,7 @@ class IO {
|
||||
}
|
||||
|
||||
static read(prompt) {
|
||||
if (!(prompt is String)) Fiber.abort("Prompt must be a string.")
|
||||
IO.write(prompt)
|
||||
return IO.read
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user