diff options
-rw-r--r-- | edit.mu | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/edit.mu b/edit.mu index 9677d28e..fd68bef0 100644 --- a/edit.mu +++ b/edit.mu @@ -3655,6 +3655,40 @@ scenario run-instruction-and-print-warnings-only-once [ ] ] +scenario run-instruction-manages-screen-per-sandbox [ + $close-trace # trace too long for github #? 1 + assume-screen 100/width, 20/height + # left editor is empty + 1:address:array:character <- new [] + # right editor contains an illegal instruction + 2:address:array:character <- new [print-integer screen:address, 4] + 3:address:programming-environment-data <- new-programming-environment screen:address, 1:address:array:character, 2:address:array:character + # run the code in the editor + assume-console [ + press 65532 # F4 + ] + run [ + event-loop screen:address, console:address, 3:address:programming-environment-data + ] + # check that it prints a little 5x5 toy screen + # hack: screen address is brittle + screen-should-contain [ + . run (F4) . + . ┊ . + .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + . ┊ x. + . ┊print-integer screen:address, 4 . + . ┊screen: . + . ┊ .4 . . + . ┊ . . . + . ┊ . . . + . ┊ . . . + . ┊ . . . + . ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. + . ┊ . + ] +] + recipe editor-contents [ local-scope editor:address:editor-data <- next-ingredient @@ -3913,40 +3947,6 @@ recipe delete-sandbox [ reply 0/false ] -scenario run-instruction-manages-screen-per-sandbox [ - $close-trace # trace too long for github #? 1 - assume-screen 100/width, 20/height - # left editor is empty - 1:address:array:character <- new [] - # right editor contains an illegal instruction - 2:address:array:character <- new [print-integer screen:address, 4] - 3:address:programming-environment-data <- new-programming-environment screen:address, 1:address:array:character, 2:address:array:character - # run the code in the editor - assume-console [ - press 65532 # F4 - ] - run [ - event-loop screen:address, console:address, 3:address:programming-environment-data - ] - # check that it prints a little 5x5 toy screen - # hack: screen address is brittle - screen-should-contain [ - . run (F4) . - . ┊ . - .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. - . ┊ x. - . ┊print-integer screen:address, 4 . - . ┊screen: . - . ┊ .4 . . - . ┊ . . . - . ┊ . . . - . ┊ . . . - . ┊ . . . - . ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. - . ┊ . - ] -] - ## clicking on sandbox results to 'fix' them and turn sandboxes into tests scenario sandbox-click-on-result-toggles-color-to-green [ |