diff --git a/src/module/io.c b/src/module/io.c index ac5a5f6d..d3ae5800 100644 --- a/src/module/io.c +++ b/src/module/io.c @@ -522,6 +522,7 @@ void stdinIsRawSet(WrenVM* vm) // Can't set raw mode when not talking to a TTY. // TODO: Make this a runtime error? } + wrenSetSlotBool(vm, 0, isStdinRaw); } void stdinIsTerminal(WrenVM* vm) diff --git a/test/io/stdin/is_raw.wren b/test/io/stdin/is_raw.wren index 556cbf1d..5853d348 100644 --- a/test/io/stdin/is_raw.wren +++ b/test/io/stdin/is_raw.wren @@ -26,3 +26,6 @@ for (i in 1..4) { // TODO: This doesn't actually detect a visible difference between raw and // non-raw mode. Maybe add support to the test runner for writing non-printing // characters to stdin? + +System.print(Stdin.isRaw=false) // expect: false +System.print(Stdin.isRaw=true) // expect: true \ No newline at end of file