annotate src/testdir/test_exec_while_if.vim @ 23701:c5b5e7520fe2 v8.2.2392

patch 8.2.2392: fennel filetype not recognized Commit: https://github.com/vim/vim/commit/402115f1c2b4d0704a822206f2e6e931e721c129 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jan 22 20:55:04 2021 +0100 patch 8.2.2392: fennel filetype not recognized Problem: Fennel filetype not recognized. Solution: Detect with pattern and hashbang. (Chinmay Dalal, closes https://github.com/vim/vim/issues/7729)
author Bram Moolenaar <Bram@vim.org>
date Fri, 22 Jan 2021 21:00:06 +0100
parents 08940efa6b4e
children 87ff80c08e4b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11651
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Test for :execute, :while and :if
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 function Test_exec_while_if()
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 new
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 let i = 0
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 while i < 12
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 let i = i + 1
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 if has("ebcdic")
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 execute "normal o" . i . "\047"
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 else
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 execute "normal o" . i . "\033"
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 endif
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 if i % 2
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 normal Ax
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 if i == 9
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 break
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 endif
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 if i == 5
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 continue
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 else
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 let j = 9
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 while j > 0
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 if has("ebcdic")
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 execute "normal" j . "a" . j . "\x27"
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 else
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 execute "normal" j . "a" . j . "\x1b"
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 endif
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 let j = j - 1
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 endwhile
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 endif
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 endif
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 if i == 9
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 if has("ebcdic")
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 execute "normal Az\047"
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 else
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 execute "normal Az\033"
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 endif
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 endif
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 endwhile
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 unlet i j
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 call assert_equal(["",
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 \ "1x999999999888888887777777666666555554444333221",
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45 \ "2",
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46 \ "3x999999999888888887777777666666555554444333221",
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 \ "4",
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48 \ "5x",
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49 \ "6",
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50 \ "7x999999999888888887777777666666555554444333221",
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51 \ "8",
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52 \ "9x"], getline(1, 10))
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53 endfunction
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 11651
diff changeset
54
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 11651
diff changeset
55 " vim: shiftwidth=2 sts=2 expandtab