diff options
Diffstat (limited to 'shell/sandbox.mu')
-rw-r--r-- | shell/sandbox.mu | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/shell/sandbox.mu b/shell/sandbox.mu index 12c9e7e6..87cebfe6 100644 --- a/shell/sandbox.mu +++ b/shell/sandbox.mu @@ -720,9 +720,27 @@ fn test-run-error-invalid-integer { # render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height # skip one line of padding - check-screen-row screen, 1/y, " 1a ", "F - test-run-error-invalid-integer/0" - check-screen-row screen, 2/y, " ... ", "F - test-run-error-invalid-integer/0" - check-screen-row screen, 3/y, " invalid number ", "F - test-run-error-invalid-integer/2" + check-screen-row screen, 1/y, " 1a ", "F - test-run-error-invalid-integer/0" + check-screen-row screen, 2/y, " ... ", "F - test-run-error-invalid-integer/1" + check-screen-row-in-color screen, 0xc/fg=error, 3/y, " invalid number ", "F - test-run-error-invalid-integer/2" +} + +fn test-run-error-unknown-symbol { + var sandbox-storage: sandbox + var sandbox/esi: (addr sandbox) <- address sandbox-storage + initialize-sandbox-with sandbox, "a" + # 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 + # skip one line of padding + check-screen-row screen, 1/y, " a ", "F - test-run-error-unknown-symbol/0" + check-screen-row screen, 2/y, " ... ", "F - test-run-error-unknown-symbol/1" + check-screen-row-in-color screen, 0xc/fg=error, 3/y, " unbound symbol: a ", "F - test-run-error-unknown-symbol/2" } fn test-run-with-spaces { |