From 67d2a9c07dea2f100f526cf6cd0831b544cd73fa Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 1 Feb 2016 13:51:49 -0800 Subject: 2624 Reorganize further to make edit/008-sandbox-test more self-contained. --- sandbox/008-sandbox-test.mu | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'sandbox/008-sandbox-test.mu') 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 [ + { + expected-response:address:shared:array:character <- get *curr, expected-response:offset + break-unless expected-response + filename <- append filename, suffix + save filename, expected-response + } +] + +before [ + 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 [ # check if it's inside the output of any sandbox @@ -110,11 +131,6 @@ after [ } ] -# 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 [ ] before [ - $log sandbox, [resetting response starting row] tmp:address:number <- get-address *sandbox, response-starting-row-on-screen:offset *tmp <- copy 0 ] -- cgit 1.4.1-2-gfad0