about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-06-25 00:44:37 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-06-25 00:44:37 -0700
commitfae8242eb944919e197f10c026fca18e4728a690 (patch)
tree881e302339ba47ae14abf42ead97341bcacc198c
parent17c3d13ed2bde1039c6070db0b8d9e4a95aafa57 (diff)
downloadmu-fae8242eb944919e197f10c026fca18e4728a690.tar.gz
1651
-rw-r--r--edit.mu22
1 files changed, 22 insertions, 0 deletions
diff --git a/edit.mu b/edit.mu
index e6ef67f6..e86e6404 100644
--- a/edit.mu
+++ b/edit.mu
@@ -495,6 +495,28 @@ scenario editor-moves-cursor-right-with-key [
   ]
 ]
 
+scenario editor-moves-cursor-to-next-line-with-right-arrow [
+  assume-screen 10:literal/width, 5:literal/height
+  assume-console [
+    press 65514  # right arrow
+    press 65514  # right arrow
+    press 65514  # right arrow
+    press 65514  # right arrow - next line
+    type [0]
+  ]
+  run [
+    1:address:array:character <- new [abc
+d]
+    2:address:editor-data <- new-editor 1:address:array:character, screen:address, 0:literal/top, 0:literal/left, 5:literal/right
+    event-loop screen:address, console:address, 2:address:editor-data
+  ]
+  screen-should-contain [
+    .abc       .
+    .0d        .
+    .          .
+  ]
+]
+
 ## helpers for drawing editor borders
 
 recipe draw-box [