From b2566a847948ba808d4ca93d02bcc62ee6487255 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 2 Feb 2016 09:59:40 -0800 Subject: 2625 --- html/edit/008-sandbox-test.mu.html | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'html/edit/008-sandbox-test.mu.html') diff --git a/html/edit/008-sandbox-test.mu.html b/html/edit/008-sandbox-test.mu.html index d5dbcfcb..28a098ae 100644 --- a/html/edit/008-sandbox-test.mu.html +++ b/html/edit/008-sandbox-test.mu.html @@ -16,6 +16,7 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } .muControl { color: #c0a020; } .muRecipe { color: #ff8700; } .muScenario { color: #00af00; } +.muData { color: #ffff00; } .Special { color: #ff6060; } .Comment { color: #9090ff; } .Constant { color: #00a0a0; } @@ -116,6 +117,27 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } ] ] +# this requires tracking a couple more things +container sandbox-data [ + response-starting-row-on-screen:number + expected-response:address:shared:array:character +] + +# include expected response when saving or restoring a sandbox +before <end-save-sandbox> [ + { + expected-response:address:shared:array:character <- get *curr, expected-response:offset + break-unless expected-response + filename <- append filename, suffix + save filename, expected-response + } +] + +before <end-restore-sandbox> [ + expected-response:address:address:shared:array:character <- get-address **curr, expected-response:offset + *expected-response <- copy contents +] + # clicks on sandbox responses save it as 'expected' after <global-touch> [ # check if it's inside the output of any sandbox @@ -190,6 +212,8 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } after <render-sandbox-response> [ { break-unless sandbox-response + response-starting-row:address:number <- get-address *sandbox, response-starting-row-on-screen:offset + *response-starting-row <- copy row expected-response:address:shared:array:character <- get *sandbox, expected-response:offset break-unless expected-response # fall-through to print in grey response-is-expected?:boolean <- equal expected-response, sandbox-response @@ -204,6 +228,11 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } jump +render-sandbox-end:label } ] + +before <end-render-sandbox-reset-hidden> [ + tmp:address:number <- get-address *sandbox, response-starting-row-on-screen:offset + *tmp <- copy 0 +] -- cgit 1.4.1-2-gfad0