diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-11-18 11:30:54 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-11-18 11:35:24 -0800 |
commit | 322ce34d77b4e2d8c6d721b156c02496d105741f (patch) | |
tree | 29e4556b502d24380126a1503203289d2293b8d0 /edit/010-warnings.mu | |
parent | 5967e82fab9feea381dd1b6e1925177e771d86dc (diff) | |
download | mu-322ce34d77b4e2d8c6d721b156c02496d105741f.tar.gz |
2458 - edit/: recipe side free of sandbox errors
This is happening because of our recent generic changes, which trigger some post-processing transforms on all recipes even if we processed them before. We could clear 'interactive' inside 'reload' to avoid this, but random 'run' blocks in scenarios can still pick up errors from sandboxes earlier in a scenario. The right place to clear the 'interactive' recipe is right after we use it, in run_code_end().
Diffstat (limited to 'edit/010-warnings.mu')
-rw-r--r-- | edit/010-warnings.mu | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/edit/010-warnings.mu b/edit/010-warnings.mu index 6e5eeace..b2d927c2 100644 --- a/edit/010-warnings.mu +++ b/edit/010-warnings.mu @@ -54,6 +54,7 @@ recipe! update-sandbox sandbox:address:sandbox-data -> sandbox:address:sandbox-d warnings:address:address:array:character <- get-address *sandbox, warnings:offset trace:address:address:array:character <- get-address *sandbox, trace:offset fake-screen:address:address:screen <- get-address *sandbox, screen:offset +#? $print [run-interactive], 10/newline *response, *warnings, *fake-screen, *trace, completed?:boolean <- run-interactive data { break-if *warnings @@ -61,6 +62,7 @@ recipe! update-sandbox sandbox:address:sandbox-data -> sandbox:address:sandbox-d *warnings <- new [took too long! ] } +#? $print [done with run-interactive], 10/newline ] # make sure we render any trace @@ -115,6 +117,39 @@ recipe foo [ ] ] +scenario run-hides-warnings-from-past-sandboxes [ + trace-until 100/app # trace too long + assume-screen 100/width, 15/height + 1:address:array:character <- new [] + 2:address:array:character <- new [get foo, x:offset] # invalid + 3:address:programming-environment-data <- new-programming-environment screen:address:screen, 1:address:array:character, 2:address:array:character + assume-console [ + press F4 # generate error + ] + run [ + event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data + ] + assume-console [ + left-click 3, 80 + press ctrl-k + type [add 2, 2] # valid code + press F4 # error should disappear + ] + run [ + event-loop screen:address:screen, console:address:console, 3:address:programming-environment-data + ] + screen-should-contain [ + . run (F4) . + . ┊ . + .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + . ┊ x. + . ┊add 2, 2 . + . ┊4 . + . ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + . ┊ . + ] +] + scenario run-shows-missing-type-warnings [ trace-until 100/app # trace too long assume-screen 100/width, 15/height |