diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-08-05 00:04:19 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-08-05 00:04:19 -0700 |
commit | df1df48ec084af08413e5cadf0fb67cd66627088 (patch) | |
tree | 9916818de68a5a555c29e27599ca0812d7b3b113 | |
parent | f90d8267d5b6e51b0a3c40fc204e023621b2bfa8 (diff) | |
download | mu-df1df48ec084af08413e5cadf0fb67cd66627088.tar.gz |
1935
-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 [ |