about summary refs log tree commit diff stats
path: root/076scenario_console_test.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-06-21 23:23:57 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-06-21 23:27:54 -0700
commit45c08fea47de1a23ce98f4fc7a1c5c3bed92b5fb (patch)
tree78cbc5db454f79c6baf91afa49f090cf8cb14a58 /076scenario_console_test.mu
parente552479afac60bdf3f5c089213cbc6422902ee5a (diff)
downloadmu-45c08fea47de1a23ce98f4fc7a1c5c3bed92b5fb.tar.gz
1616 - merging keyboard and events into 'console'
Only core layers currently passing. Console apps are probably still
broken.
Diffstat (limited to '076scenario_console_test.mu')
-rw-r--r--076scenario_console_test.mu25
1 files changed, 25 insertions, 0 deletions
diff --git a/076scenario_console_test.mu b/076scenario_console_test.mu
new file mode 100644
index 00000000..bfa72861
--- /dev/null
+++ b/076scenario_console_test.mu
@@ -0,0 +1,25 @@
+# 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:character, console:address, 2:boolean <- read-key console:address
+    3:character, console:address, 4:boolean <- read-key console:address
+    5:character, console:address, 6:boolean <- read-key console:address
+    7:character, console:address, 8:boolean <- read-key console:address
+  ]
+  memory-should-contain [
+    1 <- 97  # 'a'
+    2 <- 1
+    3 <- 98  # 'b'
+    4 <- 1
+    5 <- 99  # 'c'
+    6 <- 1
+    7 <- 0  # eof
+    8 <- 1
+  ]
+]