Skip to content

Commit cb381bf

Browse files
committed
(chore) consistent setter behavior
- Resolves wren-lang#54
1 parent 8229047 commit cb381bf

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/module/io.c

+1
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ void stdinIsRawSet(WrenVM* vm)
522522
// Can't set raw mode when not talking to a TTY.
523523
// TODO: Make this a runtime error?
524524
}
525+
wrenSetSlotBool(vm, 0, isStdinRaw);
525526
}
526527

527528
void stdinIsTerminal(WrenVM* vm)

test/io/stdin/is_raw.wren

+3
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ for (i in 1..4) {
2626
// TODO: This doesn't actually detect a visible difference between raw and
2727
// non-raw mode. Maybe add support to the test runner for writing non-printing
2828
// characters to stdin?
29+
30+
System.print(Stdin.isRaw=false) // expect: false
31+
System.print(Stdin.isRaw=true) // expect: true

0 commit comments

Comments
 (0)