diff options
Diffstat (limited to 'html/edit/008-sandbox-test.mu.html')
-rw-r--r-- | html/edit/008-sandbox-test.mu.html | 29 |
1 files changed, 29 insertions, 0 deletions
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; } ] ] +<span class="Comment"># this requires tracking a couple more things</span> +<span class="muData">container</span> sandbox-data [ + response-starting-row-on-screen:number + expected-response:address:shared:array:character +] + +<span class="Comment"># include expected response when saving or restoring a sandbox</span> +<span class="muRecipe">before</span> <span class="Constant"><end-save-sandbox></span> [ + <span class="Delimiter">{</span> + expected-response:address:shared:array:character<span class="Special"> <- </span>get *curr, <span class="Constant">expected-response:offset</span> + <span class="muControl">break-unless</span> expected-response + filename<span class="Special"> <- </span>append filename, suffix + save filename, expected-response + <span class="Delimiter">}</span> +] + +<span class="muRecipe">before</span> <span class="Constant"><end-restore-sandbox></span> [ + expected-response:address:address:shared:array:character<span class="Special"> <- </span>get-address **curr, <span class="Constant">expected-response:offset</span> + *expected-response<span class="Special"> <- </span>copy contents +] + <span class="Comment"># clicks on sandbox responses save it as 'expected'</span> <span class="muRecipe">after</span> <span class="Constant"><global-touch></span> [ <span class="Comment"># check if it's inside the output of any sandbox</span> @@ -190,6 +212,8 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } <span class="muRecipe">after</span> <span class="Constant"><render-sandbox-response></span> [ <span class="Delimiter">{</span> <span class="muControl">break-unless</span> sandbox-response + response-starting-row:address:number<span class="Special"> <- </span>get-address *sandbox, <span class="Constant">response-starting-row-on-screen:offset</span> + *response-starting-row<span class="Special"> <- </span>copy row expected-response:address:shared:array:character<span class="Special"> <- </span>get *sandbox, <span class="Constant">expected-response:offset</span> <span class="muControl">break-unless</span> expected-response <span class="Comment"># fall-through to print in grey</span> response-is-expected?:boolean<span class="Special"> <- </span>equal expected-response, sandbox-response @@ -204,6 +228,11 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } <span class="muControl">jump</span> <span class="Constant">+render-sandbox-end:label</span> <span class="Delimiter">}</span> ] + +<span class="muRecipe">before</span> <span class="Constant"><end-render-sandbox-reset-hidden></span> [ + tmp:address:number<span class="Special"> <- </span>get-address *sandbox, <span class="Constant">response-starting-row-on-screen:offset</span> + *tmp<span class="Special"> <- </span>copy <span class="Constant">0</span> +] </pre> </body> </html> |