robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
af23d17388
master
1" Test for :execute, :while, :for and :if 2 3func Test_exec_while_if () 4new 5 6let i = 0 7while i < 12 8let i = i + 1 9execute "normal o" . i . "\033" 10if i % 2 11normal Ax 12if i == 9 13break 14endif 15if i == 5 16continue 17else 18let j = 9 19while j > 0 20execute "normal" j . "a" . j . "\x1b" 21let j = j - 1 22endwhile 23endif 24endif 25if i == 9 26execute "normal Az\033" 27endif 28endwhile 29unlet i j 30 31call assert_equal ([ "" , 32 \"1x999999999888888887777777666666555554444333221" , 33 \"2" , 34 \"3x999999999888888887777777666666555554444333221" , 35 \"4" , 36 \"5x" , 37 \"6" , 38 \"7x999999999888888887777777666666555554444333221" , 39 \"8" , 40 \"9x" ], getline ( 1 , 10 )) 41endfunc 42 43" vim: shiftwidth=2 sts=2 expandtab