robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

dundargoctest: move oldtests to test directory (#22536)af23d17388

master
862 B43 linesraw
1" Test for :execute, :while, :for and :if
2
3func Test_exec_while_if()
4  new
5
6  let i = 0
7  while i < 12
8    let i = i + 1
9    execute "normal o" . i . "\033"
10    if i % 2
11      normal Ax
12      if i == 9
13        break
14      endif
15      if i == 5
16        continue
17      else
18        let j = 9
19        while j > 0
20          execute "normal" j . "a" . j . "\x1b"
21          let j = j - 1
22        endwhile
23      endif
24    endif
25    if i == 9
26      execute "normal Az\033"
27    endif
28  endwhile
29  unlet i j
30
31  call 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