robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
f907614088
master
1-- Tests Blockwise Visual when there are TABs before the text. 2-- First test for undo working properly when executing commands from a register. 3-- Also test this in an empty buffer. 4 5local n =require ( 'test.functional.testnvim' )() 6local t =require ( 'test.testutil' ) 7 8local describe , it , setup =t . describe , t . it , t . setup 9local clear , feed , insert =n . clear , n . feed , n . insert 10local feed_command , expect =n . feed_command , n . expect 11 12describe ( 'blockwise visual' , function () 13setup ( clear ) 14 15it ( 'is working' , function () 16insert ( [[ 17123456 18234567 19345678 20 21test text test tex start here 22some text 23test text 24test text 25 26x jAy kdd 27Ox jAy kdd]] ) 28 29feed ( ":let @a = 'Ox<C-v><Esc>jAy<C-v><Esc>kdd'<cr>" ) 30feed ( 'G0k@au' ) 31feed_command ( 'new' ) 32feed ( '@auY' ) 33feed_command ( 'quit' ) 34feed ( 'GP' ) 35feed_command ( '/start here' ) 36feed ( '"by$<C-v>jjlld' ) 37feed_command ( '/456' ) 38feed ( '<C-v>jj"bP' ) 39feed_command ( '$-3,$d' ) 40 41expect ( [[ 42123start here56 43234start here67 44345start here78 45 46test text test tex rt here 47somext 48tesext 49test text]] ) 50end ) 51end )