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 feed =n . feed 8local fn =n . fn 9 10before_each ( clear ) 11 12describe ( ':move' , function () 13-- oldtest: Test_move_undo() 14it ( 'redraws correctly when undone' , function () 15local screen =Screen . new ( 60 , 10 ) 16 17fn . setline ( 1 , { 'First' , 'Second' , 'Third' , 'Fourth' } ) 18feed ( 'gg:move +1<CR>' ) 19screen : expect ( [[ 20Second | 21^First | 22Third | 23Fourth | 24{1:~ }|*5 25:move +1 | 26]] ) 27 28-- here the display would show the last few lines scrolled down 29feed ( 'u' ) 30feed ( ':<Esc>' ) 31screen : expect ( [[ 32^First | 33Second | 34Third | 35Fourth | 36{1:~ }|*5 37| 38]] ) 39end ) 40end )