robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
f907614088
master
1-- Tests for [ CTRL-I with a count and CTRL-W CTRL-I with a count 2 3local n =require ( 'test.functional.testnvim' )() 4local t =require ( 'test.testutil' ) 5 6local describe , it , setup =t . describe , t . it , t . setup 7local clear , feed , insert =n . clear , n . feed , n . insert 8local feed_command , expect =n . feed_command , n . expect 9 10describe ( 'CTRL-W CTRL-I' , function () 11setup ( clear ) 12 13it ( 'is working' , function () 14insert ( [[ 15#include test21.in 16 17/* test text test tex start here 18some text 19test text 20start OK if found this line 21start found wrong line 22test text]] ) 23 24-- Search for the second occurrence of start and append to register 25feed_command ( '/start' ) 26feed ( '2[<C-i>' ) 27feed_command ( 'yank A' ) 28 29-- Same as above but using different keystrokes. 30feed ( '?start<cr>' ) 31feed ( '2<C-w><Tab>' ) 32feed_command ( 'yank A' ) 33 34-- Clean buffer and put register 35feed ( 'ggdG"ap' ) 36feed_command ( '1d' ) 37 38-- The buffer should now contain: 39expect ( [[ 40start OK if found this line 41start OK if found this line]] ) 42end ) 43end )