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:
@@ -85,6 +85,10 @@ WrenVM* wrenNewVM(WrenConfiguration* configuration);
|
||||
void wrenFreeVM(WrenVM* vm);
|
||||
|
||||
// Runs [source], a string of Wren source code in a new fiber in [vm].
|
||||
//
|
||||
// [sourcePath] is a string describing where [source] was located, for use in
|
||||
// debugging stack traces. It must not be `null`. If an empty string, it will
|
||||
// not be shown in a stack trace.
|
||||
WrenInterpretResult wrenInterpret(WrenVM* vm, const char* sourcePath,
|
||||
const char* source);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user