about summary refs log tree commit diff stats
path: root/083scenario_screen_test.mu
blob: a21a9fdf402a13c74479e3a1b06e9d9bd3a6f934 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 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:&:screen <- print screen:&: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:&:screen <- print screen:&:screen, a
  # move cursor to start of line
  screen:&:screen <- move-cursor screen:&:screen, 0/row, 0/column
  run [
    screen:&:screen <- clear-line screen:&:screen
  ]
  screen-should-contain [
    .     .
    .     .
    .     .
  ]
]