From 7aef0b24e83e38224f0c77a55c9d5356ae6830f4 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 9 Jun 2016 18:46:02 -0700 Subject: 3041 - fix 3039 in sandbox/ as well --- sandbox/006-sandbox-copy.mu | 1 + sandbox/010-sandbox-trace.mu | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) 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 -- cgit 1.4.1-2-gfad0