diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-07-27 16:01:55 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-07-27 17:47:59 -0700 |
commit | 6e1eeeebfb453fa7c871869c19375ce60fbd7413 (patch) | |
tree | 539c4a3fdf1756ae79770d5c4aaf6366f1d1525e /archive/2.vm/083scenario_screen_test.mu | |
parent | 8846a7f85cc04b77b2fe8a67b6d317723437b00c (diff) | |
download | mu-6e1eeeebfb453fa7c871869c19375ce60fbd7413.tar.gz |
5485 - promote SubX to top-level
Diffstat (limited to 'archive/2.vm/083scenario_screen_test.mu')
-rw-r--r-- | archive/2.vm/083scenario_screen_test.mu | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/archive/2.vm/083scenario_screen_test.mu b/archive/2.vm/083scenario_screen_test.mu new file mode 100644 index 00000000..b4ac6e5e --- /dev/null +++ b/archive/2.vm/083scenario_screen_test.mu @@ -0,0 +1,47 @@ +# To check our support for screens in scenarios, rewrite tests from print.mu + +scenario print-character-at-top-left-2 [ + local-scope + assume-screen 3/width, 2/height + run [ + a:char <- copy 97/a + screen <- print screen, a + ] + screen-should-contain [ + .a . + . . + ] +] + +scenario clear-line-erases-printed-characters-2 [ + local-scope + assume-screen 5/width, 3/height + # print a character + a:char <- copy 97/a + screen <- print screen, a + # move cursor to start of line + screen <- move-cursor screen, 0/row, 0/column + run [ + screen <- clear-line screen + ] + screen-should-contain [ + . . + . . + . . + ] +] + +scenario scroll-screen [ + local-scope + assume-screen 3/width, 2/height + run [ + a:char <- copy 97/a + move-cursor screen, 1/row, 2/column + screen <- print screen, a + screen <- print screen, a + ] + screen-should-contain [ + . a. + .a . + ] +] |