about summary refs log tree commit diff stats
path: root/073scenario_screen_test.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-05 21:17:24 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-05 21:17:24 -0700
commitb96af395b9af2ff9df94b3e82213171f30827c8d (patch)
tree17c8c12648ccc25625e2534ec8d74fbe8f1542cc /073scenario_screen_test.mu
parent2e3b597fe85b654e82b891c22d50754fa5a26156 (diff)
downloadmu-b96af395b9af2ff9df94b3e82213171f30827c8d.tar.gz
1276 - make C++ version the default
I've tried to update the Readme, but there are at least a couple of issues.
Diffstat (limited to '073scenario_screen_test.mu')
-rw-r--r--073scenario_screen_test.mu29
1 files changed, 29 insertions, 0 deletions
diff --git a/073scenario_screen_test.mu b/073scenario_screen_test.mu
new file mode 100644
index 00000000..fa1a026c
--- /dev/null
+++ b/073scenario_screen_test.mu
@@ -0,0 +1,29 @@
+# To check our support for screens in scenarios, rewrite tests from print.mu
+
+scenario print-character-at-top-left2 [
+  assume-screen 3:literal/width, 2:literal/height
+  run [
+    screen:address <- print-character screen:address, 97:literal  # 'a'
+  ]
+  screen-should-contain [
+    .a  .
+    .   .
+  ]
+]
+
+scenario clear-line-erases-printed-characters2 [
+  assume-screen 5:literal/width, 3:literal/height
+  run [
+    # print a character
+    screen:address <- print-character screen:address, 97:literal  # 'a'
+    # move cursor to start of line
+    screen:address <- move-cursor screen:address, 0:literal/row, 0:literal/column
+    # clear line
+    screen:address <- clear-line screen:address
+  ]
+  screen-should-contain [
+    .     .
+    .     .
+    .     .
+  ]
+]