Files
wren/test/io/stdin/read_line_closed.wren
T
retoor b9ae226cd8 feat: add test cases for readByte and readLine on closed Stdin
Add two new test files verifying that calling Stdin.readByte() and Stdin.readLine() on a closed stdin stream correctly produces the expected error message "Stdin was closed." when caught via Fiber.try().
2026-01-25 09:54:09 +00:00

11 lines
181 B
JavaScript
Vendored

// retoor <retoor@molodetz.nl>
import "io" for Stdin
var fiber = Fiber.new {
Stdin.readLine()
}
var result = fiber.try()
System.print(fiber.error) // expect: Stdin was closed.