Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/module/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions test/io/stdin/is_raw.wren
Original file line number Diff line number Diff line change
Expand Up @@ -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