mu/086scenario_console_test.mu
Kartik K. Agaram d803b68769 3565
Cleaning up the console interfaces before we start changing the socket
interfaces to look like them. Reading from sockets need to be
non-blocking just like reading from the console.
2016-10-23 15:50:57 -07:00

26 lines
506 B
Plaintext

# To check our support for consoles in scenarios, rewrite tests from
# scenario_console.mu
# Tests for console interface.
scenario read-key-in-mu [
assume-console [
type [abc]
]
run [
1:char, 2:bool <- read-key console
3:char, 4:bool <- read-key console
5:char, 6:bool <- read-key console
7:char, 8:bool <- read-key console
]
memory-should-contain [
1 <- 97 # 'a'
2 <- 1
3 <- 98 # 'b'
4 <- 1
5 <- 99 # 'c'
6 <- 1
7 <- 0 # eof
8 <- 1
]
]