about summary refs log blame commit diff stats
path: root/073scenario_screen_test.mu
blob: 79831ca021196a791fbe29c540c47f09d5d735ab (plain) (tree)
1
2
3
4
5
6


                                                                            
                                 
       
                                                          







                                                
                                 

                       
                                                          
                                  
                                                                 








                                               
# To check our support for screens in scenarios, rewrite tests from print.mu

scenario print-character-at-top-left2 [
  assume-screen 3/width, 2/height
  run [
    screen:address <- print-character screen:address, 97/a
  ]
  screen-should-contain [
    .a  .
    .   .
  ]
]

scenario clear-line-erases-printed-characters2 [
  assume-screen 5/width, 3/height
  run [
    # print a character
    screen:address <- print-character screen:address, 97/a
    # move cursor to start of line
    screen:address <- move-cursor screen:address, 0/row, 0/column
    # clear line
    screen:address <- clear-line screen:address
  ]
  screen-should-contain [
    .     .
    .     .
    .     .
  ]
]