diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-02-01 13:51:49 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-02-01 13:56:21 -0800 |
commit | 67d2a9c07dea2f100f526cf6cd0831b544cd73fa (patch) | |
tree | a78367a21ac4ab5c1d54a29b8ad9ec69ef7e7e18 /sandbox/008-sandbox-test.mu | |
parent | 07a6418389a6c36c0fe9cded6e585fb013ec90e1 (diff) | |
download | mu-67d2a9c07dea2f100f526cf6cd0831b544cd73fa.tar.gz |
2624
Reorganize further to make edit/008-sandbox-test more self-contained.
Diffstat (limited to 'sandbox/008-sandbox-test.mu')
-rw-r--r-- | sandbox/008-sandbox-test.mu | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/sandbox/008-sandbox-test.mu b/sandbox/008-sandbox-test.mu index c5695610..b299f704 100644 --- a/sandbox/008-sandbox-test.mu +++ b/sandbox/008-sandbox-test.mu @@ -81,6 +81,27 @@ recipe foo [ ] ] +# 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 @@ -110,11 +131,6 @@ after <global-touch> [ } ] -# this requires tracking where responses begin for every sandbox -container sandbox-data [ - response-starting-row-on-screen:number -] - recipe find-click-in-sandbox-output env:address:shared:programming-environment-data, click-row:number -> sandbox:address:shared:sandbox-data [ local-scope load-ingredients @@ -178,7 +194,6 @@ after <render-sandbox-response> [ ] before <end-render-sandbox-reset-hidden> [ - $log sandbox, [resetting response starting row] tmp:address:number <- get-address *sandbox, response-starting-row-on-screen:offset *tmp <- copy 0 ] |