diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-09-10 20:36:42 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-09-10 20:36:42 -0700 |
commit | 20b159420607a01c732f0f821730870f97eccc8e (patch) | |
tree | 4be198886fca381d1c76692f85478b62e35303ff /apps | |
parent | 282e3277744467197668b04ca69eb92c77ca2f8d (diff) | |
download | mu-20b159420607a01c732f0f821730870f97eccc8e.tar.gz |
6765
Starting to gain confidence.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/browse/paginated-screen.mu | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/apps/browse/paginated-screen.mu b/apps/browse/paginated-screen.mu index ec01bc4b..345465d5 100644 --- a/apps/browse/paginated-screen.mu +++ b/apps/browse/paginated-screen.mu @@ -196,6 +196,28 @@ fn test-print-single-page { # currently it's hard-coded that we avoid printing to the bottom-most row of the screen } +fn test-print-single-page-narrower-than-page-width { + var pg-on-stack: paginated-screen + var pg/eax: (addr paginated-screen) <- address pg-on-stack + initialize-fake-paginated-screen pg, 2, 4, 5, 0, 0 # 2 rows, 4 columns, 5-column pages + start-drawing pg + var c/ecx: grapheme <- copy 0x61 # 'a' + add-grapheme pg, c + var c/ecx: grapheme <- copy 0x62 # 'b' + add-grapheme pg, c + var c/ecx: grapheme <- copy 0x63 # 'c' + add-grapheme pg, c + var c/ecx: grapheme <- copy 0x64 # 'd' + add-grapheme pg, c + var c/ecx: grapheme <- copy 0x65 # 'e' + add-grapheme pg, c + var screen-ah/eax: (addr handle screen) <- get pg, screen + var screen-addr/eax: (addr screen) <- lookup *screen-ah + check-screen-row screen-addr, 1, "abcd", "F - test-print-single-page-narrower-than-page-width/row1" + check-screen-row screen-addr, 2, "e ", "F - test-print-single-page-narrower-than-page-width/row2" + # currently it's hard-coded that we avoid printing to the bottom-most row of the screen +} + fn test-print-multiple-pages { var pg-on-stack: paginated-screen var pg/eax: (addr paginated-screen) <- address pg-on-stack |