about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-07-24 00:42:28 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-07-24 00:42:28 -0700
commit0b1d1b202667f69de44fe989b3838c06a4a42619 (patch)
tree9be21aab35328f2d891bf8b6e01744036f8be1b1
parent93b7d98351cd7e090dd9a37f2786f4f0758c2c6e (diff)
downloadmu-0b1d1b202667f69de44fe989b3838c06a4a42619.tar.gz
1831
-rw-r--r--edit.mu28
1 files changed, 28 insertions, 0 deletions
diff --git a/edit.mu b/edit.mu
index 7fed9f62..9b63afe4 100644
--- a/edit.mu
+++ b/edit.mu
@@ -3232,6 +3232,34 @@ recipe foo [
   ]
 ]
 
+scenario run-shows-get-on-non-container-warnings [
+  $close-trace
+  assume-screen 100:literal/width, 15:literal/height
+  assume-console [
+    press 65526  # F10
+  ]
+  run [
+    x:address:array:character <- new [ 
+recipe foo [
+  x:address:point <- new point:type
+  get x:address:point, 1:offset
+]]
+    y:address:array:character <- new [foo]
+    env:address:programming-environment-data <- new-programming-environment screen:address, x:address:array:character, y:address:array:character
+    event-loop screen:address, console:address, env:address:programming-environment-data
+  ]
+  screen-should-contain [
+    .                                                                                 run (F10)          .
+    .                                                  ┊                                                 .
+    .recipe foo [                                      ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .  x:address:point <- new point:type               ┊                                                x.
+    .  get x:address:point, 1:offset                   ┊foo                                              .
+    .]                                                 ┊foo: 'get' on a non-container x:address:point    .
+    .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .                                                  ┊                                                 .
+  ]
+]
+
 ## helpers for drawing editor borders
 
 recipe draw-box [