robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
f907614088
master
1local n =require ( 'test.functional.testnvim' )() 2local t =require ( 'test.testutil' ) 3local Screen =require ( 'test.functional.ui.screen' ) 4 5local describe , it , before_each =t . describe , t . it , t . before_each 6local clear =n . clear 7local source =n . source 8 9describe ( 'put' , function () 10before_each ( clear ) 11 12-- oldtest: Test_put_other_window() 13it ( 'above topline in buffer in two splits' , function () 14local screen =Screen . new ( 80 , 10 ) 15source ( [[ 1640vsplit 170put ='some text at the top' 18put =' one more text' 19put =' two more text' 20put =' three more text' 21put =' four more text' 22]] ) 23 24screen : expect ( [[ 25some text at the top │some text at the top | 26one more text │ one more text | 27two more text │ two more text | 28three more text │ three more text | 29^four more text │ four more text | 30│ | 31{1:~ }│{1:~ }|*2 32{3:[No Name] [+] }{2:[No Name] [+] }| 33| 34]] ) 35end ) 36 37-- oldtest: Test_put_in_last_displayed_line() 38it ( 'in last displayed line' , function () 39local screen =Screen . new ( 75 , 10 ) 40source ( [[ 41autocmd CursorMoved * eval line('w$') 42let @a = 'x'->repeat(&columns * 2 - 2) 43eval range(&lines)->setline(1) 44call feedkeys('G"ap') 45]] ) 46 47screen : expect ( [[ 482 | 493 | 504 | 515 | 526 | 537 | 548 | 559xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| 56xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx^x | 57| 58]] ) 59end ) 60end )