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:
Bob Nystrom
2015-01-12 05:47:29 +00:00
parent e12b36002e
commit d6b70a0af3
8 changed files with 44 additions and 5 deletions
+4
View File
@@ -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);