about summary refs log blame commit diff stats
path: root/083scenario_screen_test.mu
blob: 17a3f140c7fc3eb935a217a5b7583d8c1b47da4c (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-left-2 [
  assume-screen 3/width, 2/height
  run [
    screen:address:screen <- print screen:address:screen, 97/a
  ]
  screen-should-contain [
    .a  .
    .   .
  ]
]

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