about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-06-09 18:46:02 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-06-09 18:46:02 -0700
commit7aef0b24e83e38224f0c77a55c9d5356ae6830f4 (patch)
tree680a46193ffb13b2c1d378251787fa435caad8b1
parent44b89d413ab63847c992791a1c202d7178e2ac08 (diff)
downloadmu-7aef0b24e83e38224f0c77a55c9d5356ae6830f4.tar.gz
3041 - fix 3039 in sandbox/ as well
-rw-r--r--sandbox/006-sandbox-copy.mu1
-rw-r--r--sandbox/010-sandbox-trace.mu41
2 files changed, 42 insertions, 0 deletions
diff --git a/sandbox/006-sandbox-copy.mu b/sandbox/006-sandbox-copy.mu
index 5fdc118f..9953ff15 100644
--- a/sandbox/006-sandbox-copy.mu
+++ b/sandbox/006-sandbox-copy.mu
@@ -179,6 +179,7 @@ def find-sandbox env:address:programming-environment-data, click-row:number -> r
   load-ingredients
   curr-sandbox:address:sandbox-data <- get *env, sandbox:offset
   {
+    break-unless curr-sandbox
     start:number <- get *curr-sandbox, starting-row-on-screen:offset
     found?:boolean <- equal click-row, start
     return-if found?, curr-sandbox
diff --git a/sandbox/010-sandbox-trace.mu b/sandbox/010-sandbox-trace.mu
index 63d56787..4ef03239 100644
--- a/sandbox/010-sandbox-trace.mu
+++ b/sandbox/010-sandbox-trace.mu
@@ -113,6 +113,47 @@ add 2, 2]
   ]
 ]
 
+scenario clicking-on-app-trace-does-nothing [
+  trace-until 100/app  # trace too long
+  assume-screen 50/width, 10/height
+  # create and expand the trace
+  1:address:array:character <- new [stash 123456789]
+  assume-console [
+    press F4
+    left-click 4, 1
+  ]
+  2:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character
+  event-loop screen:address:screen, console:address:console, 2:address:programming-environment-data
+  screen-should-contain [
+    .                               run (F4)           .
+    .                                                  .
+    .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .0   edit           copy           delete          .
+    .stash 123456789                                   .
+    .123456789                                         .
+    .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .                                                  .
+  ]
+  # click on the stash under the edit-button region (or any of the other buttons, really)
+  assume-console [
+    left-click 5, 7
+  ]
+  run [
+    event-loop screen:address:screen, console:address:console, 2:address:programming-environment-data
+  ]
+  # no change; doesn't die
+  screen-should-contain [
+    .                               run (F4)           .
+    .                                                  .
+    .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .0   edit           copy           delete          .
+    .stash 123456789                                   .
+    .123456789                                         .
+    .━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.
+    .                                                  .
+  ]
+]
+
 container sandbox-data [
   trace:address:array:character
   display-trace?:boolean