about summary refs log tree commit diff stats
path: root/janet
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2024-04-05 12:38:00 -0400
committerelioat <elioat@tilde.institute>2024-04-05 12:38:00 -0400
commite57315dac71d59ece5cf6ac3582dfbde73b17266 (patch)
tree5d55dada66ae9bab77ac22fb876e19bc1d487424 /janet
parent1f6f62c739b170dbfdd531bb5e4be5dca419c1c4 (diff)
downloadtour-e57315dac71d59ece5cf6ac3582dfbde73b17266.tar.gz
*
Diffstat (limited to 'janet')
0 files changed, 0 insertions, 0 deletions
id='n92' href='#n92'>92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
17-06-22 10:28:26 -0700
committer  Kartik K. Agaram <vc@akkartik.com>  2017-06-22 10:28:26 -0700

3936' href='/akkartik/mu/commit/083scenario_screen_test.mu?h=main&id=fb942da8a9ffc2e52f5e838a5f57decae67bcabb'>fb942da8 ^
1fd41772 ^






051c4738 ^
6f65d591 ^
bc643692 ^
6f65d591 ^

fb942da8 ^
6f65d591 ^
fb942da8 ^
1fd41772 ^
fb942da8 ^
1fd41772 ^






e80fd05f ^














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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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  .
  ]
]