diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-04-27 23:04:20 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-04-27 23:04:20 -0700 |
commit | 9e9e40c05a1a6df71f57f98044da4258ac013b5c (patch) | |
tree | fd119decebec07ae23cb7378285d2162a6cd7780 | |
parent | 409d26ca877b0bb6a0ccfd037ea7883a72799460 (diff) | |
download | mu-9e9e40c05a1a6df71f57f98044da4258ac013b5c.tar.gz |
.
-rw-r--r-- | shell/sandbox.mu | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/shell/sandbox.mu b/shell/sandbox.mu index 1d97cfd0..ad5c0a15 100644 --- a/shell/sandbox.mu +++ b/shell/sandbox.mu @@ -745,6 +745,23 @@ fn test-run-integer { check-screen-row screen, 2/y, "=> 1 ", "F - test-run-integer/2" } +fn test-run-error-invalid-integer { + var sandbox-storage: sandbox + var sandbox/esi: (addr sandbox) <- address sandbox-storage + initialize-sandbox-with sandbox, "1a" + # eval + edit-sandbox sandbox, 0x13/ctrl-s, 0/no-globals, 0/no-disk, 0/no-screen, 0/no-tweak-screen + # setup: screen + var screen-on-stack: screen + var screen/edi: (addr screen) <- address screen-on-stack + initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics + # + render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height + check-screen-row screen, 0/y, "1a ", "F - test-run-error-invalid-integer/0" + check-screen-row screen, 1/y, "... ", "F - test-run-error-invalid-integer/0" + check-screen-row screen, 2/y, "invalid number ", "F - test-run-error-invalid-integer/2" +} + fn test-run-with-spaces { var sandbox-storage: sandbox var sandbox/esi: (addr sandbox) <- address sandbox-storage @@ -868,23 +885,6 @@ fn test-run-multiple-expressions-after-dot { # further errors may occur } -fn test-run-error-invalid-integer { - var sandbox-storage: sandbox - var sandbox/esi: (addr sandbox) <- address sandbox-storage - initialize-sandbox-with sandbox, "1a" - # eval - edit-sandbox sandbox, 0x13/ctrl-s, 0/no-globals, 0/no-disk, 0/no-screen, 0/no-tweak-screen - # setup: screen - var screen-on-stack: screen - var screen/edi: (addr screen) <- address screen-on-stack - initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics - # - render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height - check-screen-row screen, 0/y, "1a ", "F - test-run-error-invalid-integer/0" - check-screen-row screen, 1/y, "... ", "F - test-run-error-invalid-integer/0" - check-screen-row screen, 2/y, "invalid number ", "F - test-run-error-invalid-integer/2" -} - fn test-run-move-cursor-into-trace { var sandbox-storage: sandbox var sandbox/esi: (addr sandbox) <- address sandbox-storage |