Mercurial > vim
annotate src/testdir/test_cindent.vim @ 25027:ea3486f096df
Added tag v8.2.3050 for changeset fda44c0b4b7bc8bec2257841f840285744198c72
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 26 Jun 2021 12:15:04 +0200 |
parents | 08940efa6b4e |
children | f2fb5d30cd16 |
rev | line source |
---|---|
11069
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test for cinoptions and cindent |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 func Test_cino_hash() |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 " Test that curbuf->b_ind_hash_comment is correctly reset |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 new |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 setlocal cindent cinoptions=#1 |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 setlocal cinoptions= |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 call setline(1, ["#include <iostream>"]) |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 call cursor(1, 1) |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 norm! o#include |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 "call feedkeys("o#include\<esc>", 't') |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 call assert_equal(["#include <iostream>", "#include"], getline(1,2)) |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 bwipe! |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 endfunc |
11087
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
15 |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
16 func Test_cino_extern_c() |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
17 " Test for cino-E |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
18 |
16720
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
16668
diff
changeset
|
19 let without_ind =<< trim [CODE] |
17172
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
20 #ifdef __cplusplus |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
21 extern "C" { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
22 #endif |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
23 int func_a(void); |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
24 #ifdef __cplusplus |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
25 } |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
26 #endif |
16720
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
16668
diff
changeset
|
27 [CODE] |
11087
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
28 |
16720
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
16668
diff
changeset
|
29 let with_ind =<< trim [CODE] |
17172
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
30 #ifdef __cplusplus |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
31 extern "C" { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
32 #endif |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
33 int func_a(void); |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
34 #ifdef __cplusplus |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
35 } |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
36 #endif |
16720
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
16668
diff
changeset
|
37 [CODE] |
11087
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
38 new |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
39 setlocal cindent cinoptions=E0 |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
40 call setline(1, without_ind) |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
41 call feedkeys("gg=G", 'tx') |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
42 call assert_equal(with_ind, getline(1, '$')) |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
43 |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
44 setlocal cinoptions=E-s |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
45 call setline(1, with_ind) |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
46 call feedkeys("gg=G", 'tx') |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
47 call assert_equal(without_ind, getline(1, '$')) |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
48 |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
49 setlocal cinoptions=Es |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
50 let tests = [ |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
51 \ ['recognized', ['extern "C" {'], "\t\t;"], |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
52 \ ['recognized', ['extern "C++" {'], "\t\t;"], |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
53 \ ['recognized', ['extern /* com */ "C"{'], "\t\t;"], |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
54 \ ['recognized', ['extern"C"{'], "\t\t;"], |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
55 \ ['recognized', ['extern "C"', '{'], "\t\t;"], |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
56 \ ['not recognized', ['extern {'], "\t;"], |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
57 \ ['not recognized', ['extern /*"C"*/{'], "\t;"], |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
58 \ ['not recognized', ['extern "C" //{'], ";"], |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
59 \ ['not recognized', ['extern "C" /*{*/'], ";"], |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
60 \ ] |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
61 |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
62 for pair in tests |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
63 let lines = pair[1] |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
64 call setline(1, lines) |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
65 call feedkeys(len(lines) . "Go;", 'tx') |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
66 call assert_equal(pair[2], getline(len(lines) + 1), 'Failed for "' . string(lines) . '"') |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
67 endfor |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
68 |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
69 bwipe! |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
70 endfunc |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
71 |
12323
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
72 func Test_cindent_rawstring() |
12238
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
73 new |
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
74 setl cindent |
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
75 call feedkeys("i" . |
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
76 \ "int main() {\<CR>" . |
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
77 \ "R\"(\<CR>" . |
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
78 \ ")\";\<CR>" . |
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
79 \ "statement;\<Esc>", "x") |
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
80 call assert_equal("\tstatement;", getline(line('.'))) |
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
81 bw! |
12323
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
82 endfunc |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
83 |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
84 func Test_cindent_expr() |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
85 new |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
86 func! MyIndentFunction() |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
87 return v:lnum == 1 ? shiftwidth() : 0 |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
88 endfunc |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
89 setl expandtab sw=8 indentkeys+=; indentexpr=MyIndentFunction() |
16720
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
16668
diff
changeset
|
90 let testinput =<< trim [CODE] |
17172
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
91 var_a = something() |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
92 b = something() |
16720
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
16668
diff
changeset
|
93 [CODE] |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
16668
diff
changeset
|
94 call setline(1, testinput) |
12323
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
95 call cursor(1, 1) |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
96 call feedkeys("^\<c-v>j$A;\<esc>", 'tnix') |
17172
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
97 let expected =<< [CODE] |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
98 var_a = something(); |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
99 b = something(); |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
100 [CODE] |
16720
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
16668
diff
changeset
|
101 call assert_equal(expected, getline(1, '$')) |
12323
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
102 |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
103 %d |
17172
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
104 let testinput =<< [CODE] |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
105 var_a = something() |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
106 b = something() |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
107 [CODE] |
16720
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
16668
diff
changeset
|
108 call setline(1, testinput) |
12323
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
109 call cursor(1, 1) |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
110 call feedkeys("^\<c-v>j$A;\<esc>", 'tnix') |
17172
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
111 let expected =<< [CODE] |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
112 var_a = something(); |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
113 b = something() |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
114 [CODE] |
16720
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
16668
diff
changeset
|
115 call assert_equal(expected, getline(1, '$')) |
12323
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
116 bw! |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
117 endfunc |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
118 |
16668
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
119 func Test_cindent_func() |
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
120 new |
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
121 setlocal cindent |
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
122 call setline(1, ['int main(void)', '{', 'return 0;', '}']) |
17837
f71ee7b04f0b
patch 8.1.1915: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents:
17172
diff
changeset
|
123 call assert_equal(-1, cindent(0)) |
f71ee7b04f0b
patch 8.1.1915: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents:
17172
diff
changeset
|
124 call assert_equal(&sw, 3->cindent()) |
f71ee7b04f0b
patch 8.1.1915: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents:
17172
diff
changeset
|
125 call assert_equal(-1, cindent(line('$')+1)) |
16668
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
126 bwipe! |
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
127 endfunc |
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
128 |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
129 func Test_cindent_1() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
130 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
131 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
132 setl cino& sts& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
133 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
134 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
135 /* start of AUTO matically checked vim: set ts=4 : */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
136 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
137 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
138 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
139 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
140 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
141 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
142 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
143 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
144 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
145 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
146 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
147 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
148 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
149 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
150 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
151 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
152 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
153 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
154 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
155 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
156 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
157 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
158 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
159 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
160 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
161 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
162 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
163 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
164 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
165 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
166 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
167 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
168 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
169 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
170 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
171 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
172 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
173 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
174 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
175 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
176 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
177 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
178 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
179 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
180 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
181 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
182 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
183 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
184 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
185 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
186 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
187 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
188 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
189 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
190 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
191 if (test) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
192 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
193 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
194 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
195 if (test) cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
196 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
197 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
198 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
199 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
200 for (blah) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
201 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
202 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
203 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
204 cmd3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
205 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
206 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
207 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
208 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
209 for (blah) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
210 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
211 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
212 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
213 cmd3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
214 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
215 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
216 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
217 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
218 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
219 cmd3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
220 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
221 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
222 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
223 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
224 /* Test for 'cindent' do/while mixed with if/else: */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
225 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
226 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
227 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
228 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
229 asdfasd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
230 while (cond); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
231 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
232 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
233 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
234 while (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
235 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
236 while (asdf); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
237 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
238 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
239 /* Test for 'cindent' with two ) on a continuation line */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
240 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
241 if (asdfasdf;asldkfj asdlkfj as;ldkfj sal;d |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
242 aal;sdkjf ( ;asldfkja;sldfk |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
243 al;sdjfka ;slkdf ) sa;ldkjfsa dlk;) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
244 line up here; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
245 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
246 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
247 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
248 /* C++ tests: */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
249 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
250 // foo() these three lines should remain in column 0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
251 // { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
252 // } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
253 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
254 /* Test for continuation and unterminated lines: */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
255 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
256 i = 99 + 14325 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
257 21345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
258 21345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
259 21345 + ( 21345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
260 21345) + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
261 2345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
262 1234; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
263 c = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
264 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
265 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
266 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
267 testje for indent with empty line |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
268 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
269 here */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
270 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
271 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
272 if (testing && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
273 not a joke || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
274 line up here) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
275 hay; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
276 if (testing && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
277 (not a joke || testing |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
278 )line up here) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
279 hay; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
280 if (testing && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
281 (not a joke || testing |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
282 line up here)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
283 hay; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
284 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
285 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
286 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
287 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
288 switch (c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
289 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
290 case xx: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
291 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
292 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
293 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
294 asdfasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
295 while (asdf); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
296 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
297 asdfasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
298 while (cond); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
299 case yy: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
300 case xx: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
301 case zz: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
302 testing; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
303 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
304 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
305 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
306 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
307 if (cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
308 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
309 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
310 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
311 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
312 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
313 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
314 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
315 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
316 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
317 if (alskdfj ;alsdkfjal;skdjf (;sadlkfsa ;dlkf j;alksdfj ;alskdjf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
318 alsdkfj (asldk;fj |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
319 awith cino=(0 ;lf this one goes to below the paren with == |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
320 ;laksjfd ;lsakdjf ;alskdf asd) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
321 asdfasdf;))) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
322 asdfasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
323 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
324 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
325 int |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
326 func(a, b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
327 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
328 int c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
329 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
330 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
331 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
332 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
333 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
334 (c2 || c3) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
335 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
336 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
337 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
338 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
339 while (asd) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
340 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
341 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
342 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
343 if (that) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
344 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
345 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
346 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
347 cdasd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
348 while (as |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
349 df); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
350 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
351 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
352 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
353 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
354 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
355 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
356 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
357 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
358 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
359 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
360 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
361 s = "/*"; b = ';' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
362 s = "/*"; b = ';'; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
363 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
364 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
365 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
366 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
367 switch (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
368 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
369 case a: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
370 switch (t) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
371 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
372 case 1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
373 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
374 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
375 case 2: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
376 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
377 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
378 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
379 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
380 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
381 case b: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
382 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
383 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
384 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
385 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
386 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
387 case c: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
388 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
389 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
390 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
391 case d: if (cond && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
392 test) { /* this line doesn't work right */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
393 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
394 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
395 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
396 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
397 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
398 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
399 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
400 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
401 if (!(vim_strchr(p_cpo, CPO_BUFOPTGLOB) != NULL && entering) && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
402 (bp_to->b_p_initialized || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
403 (!entering && vim_strchr(p_cpo, CPO_BUFOPT) != NULL))) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
404 return; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
405 label : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
406 asdf = asdf ? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
407 asdf : asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
408 asdf = asdf ? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
409 asdf: asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
410 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
411 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
412 /* Special Comments : This function has the added complexity (compared */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
413 /* : to addtolist) of having to check for a detail */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
414 /* : texture and add that to the list first. */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
415 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
416 char *(array[100]) = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
417 "testje", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
418 "foo", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
419 "bar", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
420 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
421 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
422 enum soppie |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
423 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
424 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
425 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
426 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
427 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
428 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
429 typedef enum soppie |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
430 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
431 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
432 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
433 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
434 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
435 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
436 static enum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
437 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
438 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
439 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
440 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
441 } soppie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
442 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
443 public static enum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
444 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
445 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
446 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
447 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
448 } soppie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
449 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
450 static private enum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
451 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
452 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
453 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
454 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
455 } soppie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
456 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
457 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
458 int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
459 b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
460 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
461 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
462 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
463 struct Type |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
464 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
465 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
466 char *str; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
467 } var[] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
468 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
469 0, "zero", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
470 1, "one", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
471 2, "two", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
472 3, "three" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
473 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
474 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
475 float matrix[3][3] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
476 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
477 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
478 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
479 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
480 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
481 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
482 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
483 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
484 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
485 5 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
486 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
487 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
488 6, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
489 7, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
490 8 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
491 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
492 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
493 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
494 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
495 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
496 /* blah ( blah */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
497 /* where does this go? */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
498 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
499 /* blah ( blah */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
500 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
501 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
502 func(arg1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
503 /* comment */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
504 arg2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
505 a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
506 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
507 b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
508 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
509 c; /* Hey, NOW it indents?! */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
510 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
511 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
512 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
513 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
514 func(arg1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
515 arg2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
516 arg3); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
517 /* Hey, what am I doing here? Is this coz of the ","? */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
518 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
519 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
520 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
521 main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
522 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
523 if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
524 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
525 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
526 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
527 if (cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
528 a = c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
529 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
530 if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
531 a = d; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
532 return; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
533 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
534 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
535 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
536 case 2: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
537 asdfasdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
538 aasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
539 a = 9; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
540 case 3: if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
541 aasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
542 a = 9; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
543 case 4: x = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
544 y = 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
545 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
546 label: if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
547 here; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
548 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
549 label: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
550 asdfasdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
551 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
552 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
553 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
554 label: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
555 asdfasdf) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
556 there; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
557 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
558 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
559 label: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
560 asdfasdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
561 there; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
562 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
563 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
564 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
565 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
566 hello with ":set comments= cino=c5" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
567 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
568 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
569 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
570 hello with ":set comments= cino=" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
571 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
572 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
573 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
574 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
575 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
576 if (a < b) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
577 a = a + 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
578 } else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
579 a = a + 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
580 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
581 if (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
582 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
583 testing; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
584 } while (asdfasdf); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
585 a = b + 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
586 asdfasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
587 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
588 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
589 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
590 for ( int i = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
591 i < 10; i++ ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
592 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
593 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
594 i = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
595 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
596 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
597 class bob |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
598 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
599 int foo() {return 1;} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
600 int bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
601 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
602 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
603 main() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
604 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
605 while(1) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
606 if (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
607 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
608 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
609 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
610 else { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
611 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
612 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
613 misplacedline; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
614 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
615 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
616 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
617 if (clipboard.state == SELECT_DONE |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
618 && ((row == clipboard.start.lnum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
619 && col >= clipboard.start.col) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
620 || row > clipboard.start.lnum)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
621 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
622 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
623 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
624 if (1) {i += 4;} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
625 where_am_i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
626 return 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
627 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
628 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
629 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
630 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
631 } // sdf(asdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
632 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
633 asd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
634 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
635 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
636 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
637 label1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
638 label2: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
639 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
640 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
641 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
642 int fooRet = foo(pBar1, false /*fKB*/, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
643 true /*fPTB*/, 3 /*nT*/, false /*fDF*/); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
644 f() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
645 for ( i = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
646 i < m; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
647 /* c */ i++ ) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
648 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
649 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
650 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
651 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
652 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
653 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
654 f1(/*comment*/); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
655 f2(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
656 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
657 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
658 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
659 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
660 if (foo) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
661 } else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
662 ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
663 } while (foo); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
664 foo(); // was wrong |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
665 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
666 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
667 int x; // no extra indent because of the ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
668 void func() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
669 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
670 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
671 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
672 char *tab[] = {"aaa", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
673 "};", /* }; */ NULL} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
674 int indented; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
675 {} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
676 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
677 char *a[] = {"aaa", "bbb", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
678 "ccc", NULL}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
679 // here |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
680 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
681 char *tab[] = {"aaa", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
682 "xx", /* xx */}; /* asdf */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
683 int not_indented; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
684 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
685 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
686 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
687 switch (bla) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
688 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
689 case 1: if (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
690 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
691 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
692 } while (boo); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
693 wrong; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
694 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
695 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
696 int foo, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
697 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
698 int foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
699 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
700 #if defined(foo) \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
701 && defined(bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
702 char * xx = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
703 foo\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
704 bor"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
705 int x; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
706 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
707 char *foo = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
708 asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
709 asdf", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
710 *bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
711 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
712 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
713 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
714 #if defined(foo) \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
715 && defined(bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
716 char *foo = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
717 asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
718 asdf", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
719 *bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
720 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
721 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
722 char *foo = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
723 asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
724 asdf", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
725 *bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
726 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
727 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
728 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
729 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
730 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
731 int y; // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
732 // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
733 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
734 // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
735 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
736 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
737 Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
738 int b ) : BaseClass(a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
739 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
740 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
741 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
742 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
743 void foo() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
744 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
745 char one, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
746 two; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
747 struct bla piet, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
748 jan; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
749 enum foo kees, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
750 jannie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
751 static unsigned sdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
752 krap; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
753 unsigned int piet, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
754 jan; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
755 int |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
756 kees, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
757 jan; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
758 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
759 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
760 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
761 t(int f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
762 int d); // ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
763 d(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
764 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
765 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
766 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
767 int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
768 ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
769 BaseClass(a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
770 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
771 c), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
772 mMember(b), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
773 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
774 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
775 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
776 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
777 int b ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
778 BaseClass(a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
779 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
780 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
781 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
782 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
783 int b ) /*x*/ : /*x*/ BaseClass(a), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
784 member(b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
785 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
786 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
787 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
788 A::A(int a, int b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
789 : aa(a), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
790 bb(b), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
791 cc(c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
792 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
793 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
794 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
795 class CAbc : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
796 public BaseClass1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
797 protected BaseClass2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
798 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
799 int Test() { return FALSE; } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
800 int Test1() { return TRUE; } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
801 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
802 CAbc(int a, int b ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
803 BaseClass(a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
804 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
805 switch(xxx) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
806 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
807 case abc: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
808 asdf(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
809 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
810 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
811 case 999: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
812 baer(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
813 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
814 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
815 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
816 |
19195
2ef19eed524a
patch 8.2.0156: various typos in source files and tests
Bram Moolenaar <Bram@vim.org>
parents:
19104
diff
changeset
|
817 public: // <-- this was incorrectly indented before!! |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
818 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
819 protected: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
820 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
821 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
822 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
823 class CAbc : public BaseClass1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
824 protected BaseClass2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
825 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
826 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
827 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
828 static struct |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
829 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
830 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
831 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
832 } variable[COUNT] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
833 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
834 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
835 123, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
836 456 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
837 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
838 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
839 123, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
840 456 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
841 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
842 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
843 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
844 static struct |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
845 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
846 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
847 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
848 } variable[COUNT] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
849 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
850 { 123, 456 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
851 { 123, 456 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
852 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
853 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
854 void asdf() /* ind_maxparen may cause trouble here */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
855 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
856 if ((0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
857 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
858 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
859 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
860 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
861 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
862 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
863 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
864 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
865 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
866 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
867 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
868 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
869 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
870 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
871 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
872 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
873 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
874 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
875 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
876 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
877 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
878 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
879 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
880 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
881 && 1)) break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
882 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
883 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
884 foo() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
885 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
886 a = cond ? foo() : asdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
887 + asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
888 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
889 a = cond ? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
890 foo() : asdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
891 + asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
892 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
893 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
894 int main(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
895 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
896 if (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
897 if (b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
898 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
899 else 3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
900 next_line_of_code(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
901 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
902 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
903 barry() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
904 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
905 Foo::Foo (int one, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
906 int two) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
907 : something(4) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
908 {} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
909 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
910 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
911 barry() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
912 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
913 Foo::Foo (int one, int two) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
914 : something(4) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
915 {} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
916 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
917 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
918 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
919 int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
920 ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
921 BaseClass(a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
922 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
923 c), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
924 mMember(b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
925 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
926 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
927 int main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
928 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
929 if (lala) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
930 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
931 ++(*lolo); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
932 while (lili |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
933 && lele); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
934 lulu; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
935 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
936 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
937 int main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
938 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
939 switch (c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
940 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
941 case 'c': if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
942 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
943 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
944 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
945 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
946 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
947 main() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
948 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
949 (void) MyFancyFuasdfadsfnction( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
950 argument); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
951 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
952 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
953 main() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
954 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
955 char foo[] = "/*"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
956 /* as |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
957 df */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
958 hello |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
959 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
960 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
961 /* valid namespaces with normal indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
962 namespace |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
963 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
964 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
965 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
966 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
967 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
968 namespace /* test */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
969 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
970 11111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
971 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
972 namespace // test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
973 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
974 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
975 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
976 namespace |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
977 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
978 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
979 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
980 namespace test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
981 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
982 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
983 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
984 namespace{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
985 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
986 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
987 namespace test{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
988 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
989 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
990 namespace { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
991 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
992 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
993 namespace test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
994 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
995 namespace test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
996 22222222222222222; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
997 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
998 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
999 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1000 /* invalid namespaces use block indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1001 namespace test test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1002 111111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1003 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1004 namespace11111111111 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1005 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1006 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1007 namespace() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1008 1111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1009 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1010 namespace() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1011 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1012 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1013 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1014 namespace test test2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1015 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1016 1111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1017 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1018 namespace111111111 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1019 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1020 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1021 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1022 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1023 void getstring() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1024 /* Raw strings */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1025 const char* s = R"( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1026 test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1027 # comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1028 field: 123 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1029 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1030 )"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1031 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1032 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1033 void getstring() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1034 const char* s = R"foo( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1035 test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1036 # comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1037 field: 123 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1038 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1039 )foo"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1040 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1041 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1042 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1043 int a[4] = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1044 [0] = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1045 [1] = 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1046 [2] = 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1047 [3] = 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1048 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1049 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1050 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1051 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1052 a = b[2] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1053 + 3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1054 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1055 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1056 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1057 if (1) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1058 /* aaaaa |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1059 * bbbbb |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1060 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1061 a = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1062 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1063 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1064 void func() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1065 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1066 switch (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1067 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1068 case (bar): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1069 if (baz()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1070 quux(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1071 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1072 case (shmoo): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1073 if (!bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1074 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1075 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1076 case (foo1): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1077 switch (bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1078 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1079 case baz: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1080 baz_f(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1081 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1082 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1083 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1084 default: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1085 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1086 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1087 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1088 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1089 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1090 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1091 /* end of AUTO */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1092 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1093 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1094 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1095 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1096 call search('start of AUTO') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1097 exe "normal =/end of AUTO\<CR>" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1098 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1099 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1100 /* start of AUTO matically checked vim: set ts=4 : */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1101 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1102 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1103 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1104 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1105 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1106 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1107 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1108 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1109 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1110 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1111 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1112 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1113 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1114 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1115 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1116 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1117 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1118 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1119 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1120 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1121 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1122 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1123 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1124 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1125 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1126 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1127 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1128 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1129 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1130 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1131 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1132 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1133 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1134 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1135 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1136 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1137 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1138 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1139 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1140 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1141 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1142 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1143 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1144 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1145 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1146 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1147 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1148 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1149 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1150 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1151 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1152 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1153 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1154 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1155 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1156 if (test) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1157 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1158 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1159 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1160 if (test) cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1161 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1162 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1163 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1164 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1165 for (blah) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1166 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1167 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1168 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1169 cmd3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1170 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1171 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1172 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1173 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1174 for (blah) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1175 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1176 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1177 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1178 cmd3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1179 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1180 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1181 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1182 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1183 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1184 cmd3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1185 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1186 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1187 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1188 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1189 /* Test for 'cindent' do/while mixed with if/else: */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1190 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1191 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1192 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1193 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1194 asdfasd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1195 while (cond); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1196 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1197 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1198 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1199 while (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1200 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1201 while (asdf); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1202 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1203 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1204 /* Test for 'cindent' with two ) on a continuation line */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1205 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1206 if (asdfasdf;asldkfj asdlkfj as;ldkfj sal;d |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1207 aal;sdkjf ( ;asldfkja;sldfk |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1208 al;sdjfka ;slkdf ) sa;ldkjfsa dlk;) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1209 line up here; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1210 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1211 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1212 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1213 /* C++ tests: */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1214 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1215 // foo() these three lines should remain in column 0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1216 // { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1217 // } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1218 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1219 /* Test for continuation and unterminated lines: */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1220 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1221 i = 99 + 14325 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1222 21345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1223 21345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1224 21345 + ( 21345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1225 21345) + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1226 2345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1227 1234; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1228 c = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1229 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1230 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1231 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1232 testje for indent with empty line |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1233 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1234 here */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1235 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1236 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1237 if (testing && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1238 not a joke || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1239 line up here) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1240 hay; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1241 if (testing && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1242 (not a joke || testing |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1243 )line up here) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1244 hay; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1245 if (testing && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1246 (not a joke || testing |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1247 line up here)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1248 hay; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1249 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1250 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1251 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1252 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1253 switch (c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1254 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1255 case xx: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1256 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1257 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1258 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1259 asdfasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1260 while (asdf); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1261 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1262 asdfasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1263 while (cond); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1264 case yy: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1265 case xx: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1266 case zz: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1267 testing; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1268 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1269 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1270 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1271 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1272 if (cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1273 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1274 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1275 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1276 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1277 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1278 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1279 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1280 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1281 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1282 if (alskdfj ;alsdkfjal;skdjf (;sadlkfsa ;dlkf j;alksdfj ;alskdjf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1283 alsdkfj (asldk;fj |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1284 awith cino=(0 ;lf this one goes to below the paren with == |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1285 ;laksjfd ;lsakdjf ;alskdf asd) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1286 asdfasdf;))) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1287 asdfasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1288 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1289 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1290 int |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1291 func(a, b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1292 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1293 int c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1294 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1295 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1296 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1297 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1298 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1299 (c2 || c3) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1300 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1301 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1302 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1303 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1304 while (asd) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1305 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1306 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1307 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1308 if (that) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1309 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1310 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1311 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1312 cdasd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1313 while (as |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1314 df); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1315 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1316 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1317 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1318 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1319 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1320 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1321 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1322 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1323 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1324 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1325 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1326 s = "/*"; b = ';' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1327 s = "/*"; b = ';'; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1328 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1329 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1330 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1331 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1332 switch (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1333 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1334 case a: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1335 switch (t) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1336 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1337 case 1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1338 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1339 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1340 case 2: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1341 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1342 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1343 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1344 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1345 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1346 case b: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1347 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1348 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1349 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1350 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1351 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1352 case c: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1353 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1354 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1355 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1356 case d: if (cond && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1357 test) { /* this line doesn't work right */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1358 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1359 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1360 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1361 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1362 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1363 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1364 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1365 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1366 if (!(vim_strchr(p_cpo, CPO_BUFOPTGLOB) != NULL && entering) && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1367 (bp_to->b_p_initialized || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1368 (!entering && vim_strchr(p_cpo, CPO_BUFOPT) != NULL))) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1369 return; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1370 label : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1371 asdf = asdf ? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1372 asdf : asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1373 asdf = asdf ? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1374 asdf: asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1375 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1376 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1377 /* Special Comments : This function has the added complexity (compared */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1378 /* : to addtolist) of having to check for a detail */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1379 /* : texture and add that to the list first. */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1380 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1381 char *(array[100]) = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1382 "testje", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1383 "foo", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1384 "bar", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1385 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1386 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1387 enum soppie |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1388 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1389 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1390 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1391 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1392 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1393 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1394 typedef enum soppie |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1395 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1396 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1397 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1398 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1399 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1400 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1401 static enum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1402 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1403 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1404 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1405 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1406 } soppie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1407 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1408 public static enum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1409 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1410 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1411 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1412 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1413 } soppie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1414 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1415 static private enum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1416 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1417 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1418 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1419 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1420 } soppie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1421 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1422 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1423 int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1424 b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1425 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1426 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1427 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1428 struct Type |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1429 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1430 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1431 char *str; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1432 } var[] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1433 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1434 0, "zero", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1435 1, "one", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1436 2, "two", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1437 3, "three" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1438 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1439 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1440 float matrix[3][3] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1441 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1442 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1443 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1444 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1445 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1446 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1447 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1448 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1449 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1450 5 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1451 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1452 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1453 6, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1454 7, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1455 8 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1456 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1457 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1458 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1459 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1460 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1461 /* blah ( blah */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1462 /* where does this go? */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1463 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1464 /* blah ( blah */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1465 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1466 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1467 func(arg1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1468 /* comment */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1469 arg2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1470 a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1471 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1472 b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1473 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1474 c; /* Hey, NOW it indents?! */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1475 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1476 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1477 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1478 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1479 func(arg1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1480 arg2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1481 arg3); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1482 /* Hey, what am I doing here? Is this coz of the ","? */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1483 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1484 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1485 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1486 main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1487 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1488 if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1489 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1490 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1491 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1492 if (cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1493 a = c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1494 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1495 if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1496 a = d; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1497 return; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1498 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1499 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1500 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1501 case 2: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1502 asdfasdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1503 aasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1504 a = 9; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1505 case 3: if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1506 aasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1507 a = 9; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1508 case 4: x = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1509 y = 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1510 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1511 label: if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1512 here; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1513 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1514 label: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1515 asdfasdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1516 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1517 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1518 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1519 label: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1520 asdfasdf) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1521 there; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1522 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1523 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1524 label: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1525 asdfasdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1526 there; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1527 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1528 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1529 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1530 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1531 hello with ":set comments= cino=c5" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1532 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1533 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1534 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1535 hello with ":set comments= cino=" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1536 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1537 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1538 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1539 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1540 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1541 if (a < b) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1542 a = a + 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1543 } else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1544 a = a + 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1545 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1546 if (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1547 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1548 testing; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1549 } while (asdfasdf); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1550 a = b + 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1551 asdfasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1552 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1553 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1554 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1555 for ( int i = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1556 i < 10; i++ ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1557 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1558 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1559 i = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1560 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1561 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1562 class bob |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1563 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1564 int foo() {return 1;} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1565 int bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1566 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1567 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1568 main() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1569 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1570 while(1) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1571 if (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1572 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1573 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1574 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1575 else { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1576 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1577 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1578 misplacedline; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1579 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1580 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1581 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1582 if (clipboard.state == SELECT_DONE |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1583 && ((row == clipboard.start.lnum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1584 && col >= clipboard.start.col) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1585 || row > clipboard.start.lnum)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1586 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1587 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1588 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1589 if (1) {i += 4;} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1590 where_am_i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1591 return 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1592 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1593 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1594 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1595 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1596 } // sdf(asdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1597 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1598 asd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1599 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1600 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1601 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1602 label1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1603 label2: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1604 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1605 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1606 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1607 int fooRet = foo(pBar1, false /*fKB*/, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1608 true /*fPTB*/, 3 /*nT*/, false /*fDF*/); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1609 f() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1610 for ( i = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1611 i < m; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1612 /* c */ i++ ) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1613 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1614 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1615 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1616 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1617 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1618 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1619 f1(/*comment*/); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1620 f2(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1621 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1622 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1623 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1624 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1625 if (foo) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1626 } else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1627 ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1628 } while (foo); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1629 foo(); // was wrong |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1630 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1631 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1632 int x; // no extra indent because of the ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1633 void func() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1634 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1635 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1636 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1637 char *tab[] = {"aaa", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1638 "};", /* }; */ NULL} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1639 int indented; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1640 {} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1641 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1642 char *a[] = {"aaa", "bbb", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1643 "ccc", NULL}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1644 // here |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1645 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1646 char *tab[] = {"aaa", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1647 "xx", /* xx */}; /* asdf */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1648 int not_indented; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1649 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1650 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1651 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1652 switch (bla) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1653 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1654 case 1: if (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1655 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1656 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1657 } while (boo); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1658 wrong; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1659 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1660 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1661 int foo, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1662 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1663 int foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1664 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1665 #if defined(foo) \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1666 && defined(bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1667 char * xx = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1668 foo\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1669 bor"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1670 int x; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1671 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1672 char *foo = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1673 asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1674 asdf", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1675 *bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1676 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1677 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1678 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1679 #if defined(foo) \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1680 && defined(bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1681 char *foo = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1682 asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1683 asdf", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1684 *bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1685 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1686 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1687 char *foo = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1688 asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1689 asdf", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1690 *bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1691 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1692 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1693 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1694 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1695 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1696 int y; // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1697 // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1698 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1699 // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1700 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1701 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1702 Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1703 int b ) : BaseClass(a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1704 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1705 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1706 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1707 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1708 void foo() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1709 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1710 char one, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1711 two; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1712 struct bla piet, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1713 jan; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1714 enum foo kees, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1715 jannie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1716 static unsigned sdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1717 krap; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1718 unsigned int piet, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1719 jan; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1720 int |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1721 kees, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1722 jan; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1723 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1724 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1725 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1726 t(int f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1727 int d); // ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1728 d(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1729 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1730 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1731 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1732 int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1733 ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1734 BaseClass(a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1735 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1736 c), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1737 mMember(b), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1738 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1739 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1740 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1741 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1742 int b ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1743 BaseClass(a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1744 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1745 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1746 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1747 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1748 int b ) /*x*/ : /*x*/ BaseClass(a), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1749 member(b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1750 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1751 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1752 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1753 A::A(int a, int b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1754 : aa(a), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1755 bb(b), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1756 cc(c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1757 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1758 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1759 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1760 class CAbc : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1761 public BaseClass1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1762 protected BaseClass2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1763 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1764 int Test() { return FALSE; } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1765 int Test1() { return TRUE; } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1766 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1767 CAbc(int a, int b ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1768 BaseClass(a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1769 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1770 switch(xxx) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1771 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1772 case abc: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1773 asdf(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1774 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1775 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1776 case 999: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1777 baer(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1778 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1779 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1780 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1781 |
19195
2ef19eed524a
patch 8.2.0156: various typos in source files and tests
Bram Moolenaar <Bram@vim.org>
parents:
19104
diff
changeset
|
1782 public: // <-- this was incorrectly indented before!! |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1783 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1784 protected: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1785 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1786 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1787 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1788 class CAbc : public BaseClass1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1789 protected BaseClass2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1790 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1791 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1792 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1793 static struct |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1794 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1795 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1796 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1797 } variable[COUNT] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1798 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1799 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1800 123, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1801 456 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1802 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1803 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1804 123, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1805 456 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1806 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1807 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1808 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1809 static struct |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1810 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1811 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1812 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1813 } variable[COUNT] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1814 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1815 { 123, 456 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1816 { 123, 456 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1817 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1818 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1819 void asdf() /* ind_maxparen may cause trouble here */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1820 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1821 if ((0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1822 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1823 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1824 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1825 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1826 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1827 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1828 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1829 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1830 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1831 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1832 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1833 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1834 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1835 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1836 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1837 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1838 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1839 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1840 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1841 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1842 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1843 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1844 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1845 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1846 && 1)) break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1847 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1848 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1849 foo() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1850 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1851 a = cond ? foo() : asdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1852 + asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1853 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1854 a = cond ? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1855 foo() : asdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1856 + asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1857 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1858 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1859 int main(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1860 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1861 if (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1862 if (b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1863 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1864 else 3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1865 next_line_of_code(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1866 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1867 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1868 barry() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1869 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1870 Foo::Foo (int one, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1871 int two) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1872 : something(4) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1873 {} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1874 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1875 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1876 barry() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1877 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1878 Foo::Foo (int one, int two) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1879 : something(4) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1880 {} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1881 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1882 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1883 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1884 int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1885 ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1886 BaseClass(a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1887 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1888 c), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1889 mMember(b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1890 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1891 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1892 int main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1893 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1894 if (lala) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1895 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1896 ++(*lolo); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1897 while (lili |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1898 && lele); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1899 lulu; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1900 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1901 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1902 int main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1903 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1904 switch (c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1905 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1906 case 'c': if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1907 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1908 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1909 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1910 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1911 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1912 main() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1913 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1914 (void) MyFancyFuasdfadsfnction( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1915 argument); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1916 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1917 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1918 main() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1919 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1920 char foo[] = "/*"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1921 /* as |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1922 df */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1923 hello |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1924 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1925 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1926 /* valid namespaces with normal indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1927 namespace |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1928 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1929 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1930 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1931 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1932 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1933 namespace /* test */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1934 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1935 11111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1936 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1937 namespace // test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1938 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1939 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1940 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1941 namespace |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1942 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1943 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1944 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1945 namespace test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1946 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1947 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1948 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1949 namespace{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1950 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1951 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1952 namespace test{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1953 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1954 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1955 namespace { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1956 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1957 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1958 namespace test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1959 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1960 namespace test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1961 22222222222222222; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1962 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1963 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1964 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1965 /* invalid namespaces use block indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1966 namespace test test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1967 111111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1968 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1969 namespace11111111111 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1970 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1971 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1972 namespace() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1973 1111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1974 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1975 namespace() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1976 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1977 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1978 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1979 namespace test test2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1980 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1981 1111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1982 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1983 namespace111111111 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1984 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1985 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1986 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1987 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1988 void getstring() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1989 /* Raw strings */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1990 const char* s = R"( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1991 test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1992 # comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1993 field: 123 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1994 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1995 )"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1996 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1997 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1998 void getstring() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1999 const char* s = R"foo( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2000 test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2001 # comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2002 field: 123 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2003 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2004 )foo"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2005 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2006 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2007 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2008 int a[4] = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2009 [0] = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2010 [1] = 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2011 [2] = 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2012 [3] = 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2013 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2014 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2015 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2016 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2017 a = b[2] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2018 + 3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2019 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2020 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2021 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2022 if (1) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2023 /* aaaaa |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2024 * bbbbb |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2025 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2026 a = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2027 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2028 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2029 void func() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2030 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2031 switch (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2032 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2033 case (bar): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2034 if (baz()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2035 quux(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2036 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2037 case (shmoo): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2038 if (!bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2039 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2040 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2041 case (foo1): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2042 switch (bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2043 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2044 case baz: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2045 baz_f(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2046 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2047 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2048 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2049 default: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2050 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2051 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2052 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2053 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2054 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2055 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2056 /* end of AUTO */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2057 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2058 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2059 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2060 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2061 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2062 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2063 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2064 func Test_cindent_2() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2065 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2066 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2067 setl tw=0 noai fo=croq |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2068 let &wm = &columns - 20 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2069 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2070 let code =<< trim [CODE] |
17172
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2071 { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2072 |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2073 /* this is |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2074 * a real serious important big |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2075 * comment |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2076 */ |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2077 /* insert " about life, the universe, and the rest" after "serious" */ |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2078 } |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2079 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2080 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2081 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2082 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2083 call search('serious', 'e') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2084 normal a about life, the universe, and the rest |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2085 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2086 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2087 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2088 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2089 /* this is |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2090 * a real serious |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2091 * about life, the |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2092 * universe, and the |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2093 * rest important big |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2094 * comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2095 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2096 /* insert " about life, the universe, and the rest" after "serious" */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2097 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2098 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2099 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2100 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2101 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2102 set wm& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2103 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2104 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2105 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2106 func Test_cindent_3() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2107 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2108 setl nocindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2109 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2110 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2111 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2112 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2113 * Testing for comments, without 'cin' set |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2114 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2115 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2116 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2117 * what happens here? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2118 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2119 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2120 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2121 the end of the comment, try inserting a line below */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2122 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2123 /* how about |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2124 this one */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2125 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2126 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2127 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2128 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2129 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2130 call search('comments') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2131 normal joabout life |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2132 call search('happens') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2133 normal jothere |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2134 call search('below') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2135 normal oline |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2136 call search('this') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2137 normal Ohello |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2138 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2139 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2140 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2141 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2142 * Testing for comments, without 'cin' set |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2143 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2144 about life |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2145 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2146 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2147 * what happens here? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2148 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2149 there |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2150 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2151 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2152 the end of the comment, try inserting a line below */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2153 line |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2154 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2155 /* how about |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2156 hello |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2157 this one */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2158 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2159 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2160 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2161 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2162 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2163 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2164 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2165 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2166 func Test_cindent_4() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2167 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2168 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2169 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2170 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2171 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2172 var = this + that + vec[0] * vec[0] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2173 + vec[1] * vec[1] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2174 + vec2[2] * vec[2]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2175 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2176 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2177 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2178 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2179 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2180 call search('vec2') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2181 normal == |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2182 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2183 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2184 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2185 var = this + that + vec[0] * vec[0] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2186 + vec[1] * vec[1] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2187 + vec2[2] * vec[2]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2188 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2189 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2190 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2191 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2192 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2193 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2194 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2195 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2196 func Test_cindent_5() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2197 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2198 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2199 setl cino=}4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2200 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2201 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2202 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2203 asdf asdflkajds f; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2204 if (tes & ting) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2205 asdf asdf asdf ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2206 asdfa sdf asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2207 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2208 testing1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2209 if (tes & ting) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2210 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2211 asdf asdf asdf ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2212 asdfa sdf asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2213 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2214 testing2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2215 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2216 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2217 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2218 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2219 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2220 call search('testing1') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2221 exe "normal k2==/testing2\<CR>" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2222 normal k2== |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2223 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2224 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2225 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2226 asdf asdflkajds f; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2227 if (tes & ting) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2228 asdf asdf asdf ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2229 asdfa sdf asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2230 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2231 testing1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2232 if (tes & ting) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2233 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2234 asdf asdf asdf ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2235 asdfa sdf asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2236 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2237 testing2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2238 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2239 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2240 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2241 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2242 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2243 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2244 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2245 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2246 func Test_cindent_6() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2247 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2248 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2249 setl cino=(0,)20 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2250 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2251 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2252 main ( int first_par, /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2253 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2254 * first par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2255 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2256 int second_par /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2257 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2258 * second par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2259 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2260 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2261 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2262 func( first_par, /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2263 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2264 * first par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2265 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2266 second_par /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2267 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2268 * second par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2269 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2270 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2271 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2272 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2273 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2274 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2275 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2276 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2277 call search('main') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2278 normal =][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2279 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2280 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2281 main ( int first_par, /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2282 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2283 * first par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2284 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2285 int second_par /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2286 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2287 * second par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2288 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2289 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2290 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2291 func( first_par, /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2292 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2293 * first par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2294 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2295 second_par /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2296 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2297 * second par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2298 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2299 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2300 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2301 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2302 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2303 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2304 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2305 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2306 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2307 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2308 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2309 func Test_cindent_7() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2310 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2311 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2312 setl cino=es,n0s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2313 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2314 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2315 main(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2316 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2317 /* Make sure that cino=X0s is not parsed like cino=Xs. */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2318 if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2319 foo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2320 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2321 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2322 bar(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2323 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2324 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2325 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2326 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2327 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2328 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2329 call search('main') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2330 normal =][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2331 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2332 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2333 main(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2334 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2335 /* Make sure that cino=X0s is not parsed like cino=Xs. */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2336 if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2337 foo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2338 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2339 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2340 bar(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2341 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2342 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2343 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2344 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2346 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2347 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2348 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2349 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2350 func Test_cindent_8() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2351 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2352 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2353 setl cino= |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2354 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2355 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2356 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2357 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2358 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2359 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2360 if () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2361 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2362 if () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2363 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2364 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2365 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2366 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2367 } while (); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2368 cmd; /* this should go under the } */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2369 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2370 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2371 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2372 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2373 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2374 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2375 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2376 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2377 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2378 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2379 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2380 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2381 if () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2382 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2383 if () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2384 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2385 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2386 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2387 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2388 } while (); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2389 cmd; /* this should go under the } */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2390 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2391 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2392 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2393 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2394 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2395 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2396 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2397 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2398 func Test_cindent_9() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2399 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2400 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2401 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2402 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2403 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2404 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2405 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2406 if ( k() ) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2407 l(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2408 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2409 } else { /* Start (two words) end */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2410 m(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2411 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2412 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2413 n(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2414 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2415 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2416 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2417 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2418 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2419 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2420 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2421 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2422 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2423 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2424 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2425 if ( k() ) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2426 l(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2427 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2428 } else { /* Start (two words) end */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2429 m(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2430 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2431 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2432 n(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2433 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2434 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2435 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2436 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2437 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2438 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2439 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2440 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2441 func Test_cindent_10() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2442 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2443 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2444 setl cino={s,e-s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2445 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2446 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2447 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2448 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2449 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2450 if ( k() ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2451 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2452 l(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2453 } else { /* Start (two words) end */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2454 m(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2455 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2456 n(); /* should be under the if () */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2457 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2458 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2459 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2460 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2461 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2462 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2463 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2464 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2465 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2466 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2467 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2468 if ( k() ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2469 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2470 l(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2471 } else { /* Start (two words) end */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2472 m(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2473 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2474 n(); /* should be under the if () */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2475 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2476 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2477 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2478 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2479 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2480 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2481 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2482 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2483 func Test_cindent_11() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2484 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2485 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2486 setl cino={s,fs |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2487 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2488 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2489 void bar(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2490 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2491 static array[2][2] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2492 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2493 { 1, 2 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2494 { 3, 4 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2495 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2496 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2497 while (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2498 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2499 foo(&a); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2500 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2501 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2502 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2503 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2504 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2505 a = a + 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2506 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2507 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2508 b = a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2509 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2510 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2511 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2512 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2513 a = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2514 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2515 b = 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2516 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2517 c = 3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2518 d = 4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2519 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2520 /* foo */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2521 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2522 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2523 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2524 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2525 exe "normal ]]=/ foo\<CR>" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2526 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2527 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2528 void bar(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2529 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2530 static array[2][2] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2531 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2532 { 1, 2 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2533 { 3, 4 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2534 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2535 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2536 while (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2537 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2538 foo(&a); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2539 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2540 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2541 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2542 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2543 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2544 a = a + 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2545 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2546 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2547 b = a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2548 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2549 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2550 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2551 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2552 a = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2553 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2554 b = 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2555 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2556 c = 3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2557 d = 4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2558 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2559 /* foo */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2560 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2561 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2562 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2563 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2564 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2565 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2566 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2567 func Test_cindent_12() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2568 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2569 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2570 setl cino= |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2571 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2572 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2573 a() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2574 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2575 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2576 a = a + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2577 a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2578 } while ( a ); /* add text under this line */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2579 if ( a ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2580 a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2581 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2582 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2583 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2584 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2585 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2586 call search('while') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2587 normal ohere |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2588 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2589 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2590 a() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2591 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2592 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2593 a = a + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2594 a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2595 } while ( a ); /* add text under this line */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2596 here |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2597 if ( a ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2598 a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2599 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2600 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2601 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2602 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2603 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2604 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2605 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2606 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2607 func Test_cindent_13() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2608 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2609 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2610 setl cino= com= |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2611 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2612 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2613 a() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2614 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2615 label1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2616 /* hmm */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2617 // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2618 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2619 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2620 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2621 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2622 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2623 call search('comment') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2624 exe "normal olabel2: b();\rlabel3 /* post */:\r/* pre */ label4:\r" . |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2625 \ "f(/*com*/);\rif (/*com*/)\rcmd();" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2626 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2627 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2628 a() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2629 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2630 label1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2631 /* hmm */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2632 // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2633 label2: b(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2634 label3 /* post */: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2635 /* pre */ label4: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2636 f(/*com*/); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2637 if (/*com*/) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2638 cmd(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2639 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2640 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2641 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2642 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2643 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2644 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2645 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2646 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2647 func Test_cindent_14() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2648 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2649 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2650 setl comments& comments^=s:/*,m:**,ex:*/ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2651 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2652 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2653 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2654 * A simple comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2655 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2656 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2657 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2658 ** A different comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2659 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2660 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2661 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2662 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2663 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2664 call search('simple') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2665 normal =5j |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2666 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2667 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2668 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2669 * A simple comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2670 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2671 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2672 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2673 ** A different comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2674 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2675 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2676 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2677 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2678 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2679 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2680 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2681 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2682 func Test_cindent_15() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2683 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2684 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2685 setl cino=c0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2686 setl comments& comments-=s1:/* comments^=s0:/* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2687 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2688 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2689 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2690 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2691 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2692 /********* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2693 A comment. |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2694 *********/ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2695 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2696 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2697 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2698 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2699 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2700 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2701 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2702 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2703 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2704 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2705 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2706 /********* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2707 A comment. |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2708 *********/ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2709 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2710 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2711 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2712 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2713 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2714 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2715 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2716 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2717 func Test_cindent_16() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2718 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2719 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2720 setl cino=c0,C1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2721 setl comments& comments-=s1:/* comments^=s0:/* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2722 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2723 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2724 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2725 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2726 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2727 /********* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2728 A comment. |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2729 *********/ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2730 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2731 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2732 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2733 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2734 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2735 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2736 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2737 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2738 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2739 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2740 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2741 /********* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2742 A comment. |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2743 *********/ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2744 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2745 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2746 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2747 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2748 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2749 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2750 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2751 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2752 func Test_cindent_17() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2753 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2754 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2755 setl cino= |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2756 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2757 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2758 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2759 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2760 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2761 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2762 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2763 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2764 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2765 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2766 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2767 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2768 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2769 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2770 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2771 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2772 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2773 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2774 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2775 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2776 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2777 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2778 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2779 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2780 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2781 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2782 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2783 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2784 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2785 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2786 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2787 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2788 func Test_cindent_18() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2789 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2790 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2791 setl cino=(s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2792 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2793 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2794 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2795 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2796 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2797 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2798 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2799 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2800 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2801 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2802 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2803 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2804 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2805 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2806 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2807 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2808 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2809 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2810 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2811 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2812 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2813 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2814 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2815 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2816 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2817 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2818 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2819 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2820 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2821 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2822 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2823 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2824 func Test_cindent_19() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2825 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2826 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2827 set cino=(s,U1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2828 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2829 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2830 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2831 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2832 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2833 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2834 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2835 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2836 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2837 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2838 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2839 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2840 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2841 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2842 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2843 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2844 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2845 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2846 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2847 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2848 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2849 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2850 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2851 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2852 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2853 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2854 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2855 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2856 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2857 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2858 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2859 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2860 func Test_cindent_20() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2861 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2862 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2863 setl cino=(0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2864 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2865 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2866 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2867 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2868 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2869 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2870 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2871 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2872 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2873 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2874 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2875 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2876 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2877 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2878 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2879 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2880 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2881 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2882 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2883 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2884 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2885 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2886 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2887 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2888 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2889 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2890 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2891 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2892 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2893 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2894 func Test_cindent_21() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2895 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2896 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2897 setl cino=(0,w1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2898 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2899 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2900 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2901 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2902 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2903 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2904 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2905 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2906 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2907 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2908 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2909 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2910 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2911 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2912 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2913 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2914 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2915 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2916 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2917 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2918 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2919 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2920 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2921 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2922 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2923 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2924 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2925 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2926 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2927 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2928 func Test_cindent_22() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2929 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2930 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2931 setl cino=(s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2932 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2933 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2934 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2935 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2936 c = c1 && ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2937 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2938 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2939 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2940 if ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2941 c1 && c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2942 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2943 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2944 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2945 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2946 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2947 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2948 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2949 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2950 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2951 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2952 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2953 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2954 c = c1 && ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2955 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2956 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2957 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2958 if ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2959 c1 && c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2960 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2961 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2962 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2963 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2964 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2965 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2966 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2967 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2968 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2969 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2970 func Test_cindent_23() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2971 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2972 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2973 setl cino=(s,m1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2974 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2975 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2976 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2977 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2978 c = c1 && ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2979 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2980 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2981 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2982 if ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2983 c1 && c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2984 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2985 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2986 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2987 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2988 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2989 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2990 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2991 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2992 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2993 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2994 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2995 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2996 c = c1 && ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2997 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2998 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2999 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3000 if ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3001 c1 && c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3002 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3003 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3004 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3005 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3006 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3007 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3008 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3009 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3010 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3011 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3012 func Test_cindent_24() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3013 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3014 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3015 setl cino=b1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3016 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3017 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3018 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3019 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3020 switch (x) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3021 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3022 case 1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3023 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3024 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3025 default: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3026 a = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3027 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3028 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3029 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3030 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3031 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3032 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3033 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3034 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3035 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3036 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3037 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3038 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3039 switch (x) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3040 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3041 case 1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3042 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3043 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3044 default: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3045 a = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3046 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3047 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3048 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3049 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3050 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3051 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3052 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3053 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3054 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3055 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3056 func Test_cindent_25() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3057 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3058 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3059 setl cino=(0,W5 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3060 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3061 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3062 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3063 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3064 invokeme( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3065 argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3066 ment); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3067 invokeme( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3068 argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3069 ment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3070 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3071 invokeme(argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3072 ment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3073 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3074 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3075 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3076 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3077 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3078 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3079 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3080 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3081 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3082 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3083 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3084 invokeme( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3085 argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3086 ment); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3087 invokeme( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3088 argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3089 ment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3090 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3091 invokeme(argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3092 ment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3093 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3094 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3095 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3096 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3097 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3098 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3099 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3100 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3101 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3102 func Test_cindent_26() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3103 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3104 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3105 setl cino=/6 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3106 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3107 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3108 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3109 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3110 statement; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3111 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3112 // comment 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3113 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3114 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3115 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3116 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3117 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3118 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3119 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3120 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3121 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3122 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3123 statement; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3124 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3125 // comment 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3126 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3127 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3128 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3129 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3130 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3131 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3132 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3133 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3134 func Test_cindent_27() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3135 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3136 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3137 setl cino= |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3138 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3139 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3140 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3141 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3142 statement; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3143 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3144 // comment 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3145 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3146 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3147 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3148 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3149 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3150 exe "normal ]]/comment 1/+1\<CR>==" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3151 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3152 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3153 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3154 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3155 statement; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3156 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3157 // comment 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3158 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3159 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3160 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3161 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3162 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3163 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3164 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3165 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3166 func Test_cindent_28() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3167 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3168 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3169 setl cino=g0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3170 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3171 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3172 class CAbc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3173 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3174 int Test() { return FALSE; } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3175 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3176 public: // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3177 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3178 protected: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3179 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3180 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3181 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3182 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3183 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3184 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3185 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3186 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3187 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3188 class CAbc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3189 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3190 int Test() { return FALSE; } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3191 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3192 public: // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3193 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3194 protected: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3195 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3196 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3197 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3198 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3199 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3200 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3201 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3202 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3203 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3204 func Test_cindent_29() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3205 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3206 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3207 setl cino=(0,gs,hs |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3208 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3209 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3210 class Foo : public Bar |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3211 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3212 public: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3213 virtual void method1(void) = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3214 virtual void method2(int arg1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3215 int arg2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3216 int arg3) = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3217 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3218 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3219 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3220 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3221 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3222 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3223 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3224 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3225 class Foo : public Bar |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3226 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3227 public: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3228 virtual void method1(void) = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3229 virtual void method2(int arg1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3230 int arg2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3231 int arg3) = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3232 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3233 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3234 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3235 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3236 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3237 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3238 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3239 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3240 func Test_cindent_30() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3241 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3242 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3243 setl cino=+20 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3244 |
17172
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3245 let code =<< [CODE] |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3246 void |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3247 foo() |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3248 { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3249 if (a) |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3250 { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3251 } else |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3252 asdf; |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3253 } |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3254 [CODE] |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3255 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3256 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3257 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3258 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3259 |
17172
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3260 let expected =<< [CODE] |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3261 void |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3262 foo() |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3263 { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3264 if (a) |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3265 { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3266 } else |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3267 asdf; |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3268 } |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3269 |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3270 [CODE] |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3271 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3272 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3273 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3274 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3275 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3276 func Test_cindent_31() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3277 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3278 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3279 setl cino=(0,W2s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3280 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3281 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3282 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3283 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3284 averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3285 asdasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3286 func(asdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3287 asdfadsf), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3288 asdfasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3289 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3290 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3291 /* those are ugly, but consequent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3292 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3293 func()->asd(asdasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3294 averylongfunctionname( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3295 abc, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3296 dec)->averylongfunctionname( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3297 asdfadsf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3298 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3299 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3300 ), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3301 func(asdfadf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3302 asdfasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3303 ), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3304 asdasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3305 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3306 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3307 averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3308 abc, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3309 dec)->asdfasdfasdf( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3310 asdfadsf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3311 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3312 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3313 ), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3314 func(asdfadf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3315 asdfasdf), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3316 asdasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3317 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3318 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3319 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3320 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3321 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3322 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3323 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3324 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3325 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3326 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3327 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3328 averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3329 asdasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3330 func(asdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3331 asdfadsf), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3332 asdfasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3333 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3334 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3335 /* those are ugly, but consequent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3336 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3337 func()->asd(asdasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3338 averylongfunctionname( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3339 abc, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3340 dec)->averylongfunctionname( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3341 asdfadsf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3342 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3343 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3344 ), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3345 func(asdfadf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3346 asdfasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3347 ), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3348 asdasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3349 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3350 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3351 averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3352 abc, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3353 dec)->asdfasdfasdf( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3354 asdfadsf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3355 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3356 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3357 ), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3358 func(asdfadf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3359 asdfasdf), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3360 asdasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3361 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3362 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3363 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3364 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3365 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3366 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3367 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3368 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3369 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3370 func Test_cindent_32() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3371 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3372 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3373 setl cino=M1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3374 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3375 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3376 int main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3377 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3378 if (cond1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3379 cond2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3380 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3381 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3382 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3383 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3384 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3385 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3386 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3387 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3388 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3389 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3390 int main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3391 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3392 if (cond1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3393 cond2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3394 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3395 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3396 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3397 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3398 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3399 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3400 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3401 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3402 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3403 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3404 func Test_cindent_33() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3405 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3406 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3407 setl cino=(0,ts |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3408 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3409 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3410 void func(int a |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3411 #if defined(FOO) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3412 , int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3413 , int c |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3414 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3415 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3416 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3417 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3418 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3419 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3420 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3421 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3422 normal 2j=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3423 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3424 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3425 void func(int a |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3426 #if defined(FOO) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3427 , int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3428 , int c |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3429 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3430 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3431 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3432 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3433 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3434 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3435 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3436 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3437 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3438 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3439 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3440 func Test_cindent_34() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3441 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3442 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3443 setl cino=(0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3444 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3445 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3446 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3447 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3448 func(int a |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3449 #if defined(FOO) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3450 , int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3451 , int c |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3452 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3453 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3454 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3455 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3456 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3457 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3458 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3459 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3460 normal =][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3461 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3462 let expected =<< trim [CODE] |
17172
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3463 |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3464 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3465 func(int a |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3466 #if defined(FOO) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3467 , int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3468 , int c |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3469 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3470 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3471 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3472 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3473 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3474 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3475 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3476 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3477 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3478 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3479 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3480 func Test_cindent_35() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3481 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3482 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3483 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3484 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3485 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3486 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3487 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3488 if(x==y) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3489 if(y==z) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3490 foo=1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3491 else { bar=1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3492 baz=2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3493 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3494 printf("Foo!\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3495 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3496 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3497 void func1(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3498 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3499 char* tab[] = {"foo", "bar", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3500 "baz", "quux", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3501 "this line used", "to be indented incorrectly"}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3502 foo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3503 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3504 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3505 void func2(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3506 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3507 int tab[] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3508 {1, 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3509 3, 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3510 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3511 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3512 printf("This line used to be indented incorrectly.\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3513 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3514 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3515 int foo[] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3516 #ifdef BAR |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3517 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3518 = { 1, 2, 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3519 4, 5, 6 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3520 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3521 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3522 ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3523 int baz; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3524 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3525 void func3(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3526 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3527 int tab[] = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3528 1, 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3529 3, 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3530 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3531 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3532 printf("Don't you dare indent this line incorrectly!\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3533 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3534 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3535 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3536 func4(a, b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3537 c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3538 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3539 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3540 int c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3541 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3542 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3543 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3544 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3545 func5( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3546 int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3547 int b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3548 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3549 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3550 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3551 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3552 func6( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3553 int a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3554 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3555 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3556 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3557 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3558 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3559 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3560 normal ]]=7][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3561 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3562 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3563 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3564 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3565 if(x==y) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3566 if(y==z) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3567 foo=1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3568 else { bar=1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3569 baz=2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3570 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3571 printf("Foo!\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3572 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3573 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3574 void func1(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3575 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3576 char* tab[] = {"foo", "bar", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3577 "baz", "quux", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3578 "this line used", "to be indented incorrectly"}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3579 foo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3580 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3581 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3582 void func2(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3583 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3584 int tab[] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3585 {1, 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3586 3, 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3587 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3588 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3589 printf("This line used to be indented incorrectly.\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3590 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3591 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3592 int foo[] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3593 #ifdef BAR |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3594 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3595 = { 1, 2, 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3596 4, 5, 6 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3597 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3598 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3599 ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3600 int baz; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3601 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3602 void func3(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3603 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3604 int tab[] = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3605 1, 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3606 3, 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3607 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3608 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3609 printf("Don't you dare indent this line incorrectly!\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3610 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3611 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3612 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3613 func4(a, b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3614 c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3615 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3616 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3617 int c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3618 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3619 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3620 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3621 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3622 func5( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3623 int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3624 int b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3625 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3626 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3627 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3628 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3629 func6( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3630 int a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3631 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3632 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3633 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3634 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3635 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3636 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3637 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3638 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3639 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3640 func Test_cindent_36() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3641 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3642 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3643 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3644 setl cino+=l1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3645 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3646 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3647 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3648 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3649 int tab[] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3650 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3651 1, 2, 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3652 4, 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3653 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3654 printf("Indent this line correctly!\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3655 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3656 switch (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3657 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3658 case bar: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3659 printf("bar"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3660 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3661 case baz: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3662 printf("baz"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3663 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3664 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3665 case quux: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3666 printf("But don't break the indentation of this instruction\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3667 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3668 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3669 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3670 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3671 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3672 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3673 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3674 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3675 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3676 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3677 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3678 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3679 int tab[] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3680 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3681 1, 2, 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3682 4, 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3683 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3684 printf("Indent this line correctly!\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3685 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3686 switch (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3687 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3688 case bar: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3689 printf("bar"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3690 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3691 case baz: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3692 printf("baz"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3693 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3694 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3695 case quux: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3696 printf("But don't break the indentation of this instruction\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3697 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3698 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3699 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3700 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3701 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3702 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3703 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3704 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3705 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3706 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3707 func Test_cindent_37() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3708 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3709 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3710 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3711 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3712 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3713 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3714 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3715 cout << "a" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3716 << "b" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3717 << ") :" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3718 << "c"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3719 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3720 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3721 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3722 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3723 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3724 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3725 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3726 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3727 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3728 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3729 cout << "a" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3730 << "b" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3731 << ") :" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3732 << "c"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3733 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3734 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3735 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3736 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3737 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3738 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3739 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3740 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3741 func Test_cindent_38() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3742 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3743 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3744 setl com=s1:/*,m:*,ex:*/ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3745 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3746 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3747 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3748 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3749 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3750 * This is a comment. |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3751 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3752 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3753 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3754 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3755 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3756 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3757 normal ]]3jofoo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3758 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3759 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3760 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3761 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3762 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3763 * This is a comment. |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3764 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3765 foo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3766 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3767 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3768 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3769 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3770 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3771 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3772 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3773 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3774 func Test_cindent_39() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3775 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3776 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3777 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3778 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3779 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3780 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3781 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3782 for (int i = 0; i < 10; ++i) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3783 if (i & 1) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3784 foo(1); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3785 } else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3786 foo(0); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3787 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3788 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3789 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3790 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3791 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3792 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3793 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3794 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3795 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3796 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3797 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3798 for (int i = 0; i < 10; ++i) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3799 if (i & 1) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3800 foo(1); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3801 } else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3802 foo(0); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3803 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3804 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3805 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3806 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3807 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3808 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3809 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3810 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3811 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3812 func Test_cindent_40() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3813 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3814 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3815 setl cino=k2s,(0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3816 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3817 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3818 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3819 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3820 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3821 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3822 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3823 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3824 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3825 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3826 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3827 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3828 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3829 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3830 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3831 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3832 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3833 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3834 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3835 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3836 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3837 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3838 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3839 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3840 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3841 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3842 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3843 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3844 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3845 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3846 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3847 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3848 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3849 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3850 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3851 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3852 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3853 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3854 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3855 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3856 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3857 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3858 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3859 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3860 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3861 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3862 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3863 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3864 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3865 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3866 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3867 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3868 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3869 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3870 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3871 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3872 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3873 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3874 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3875 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3876 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3877 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3878 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3879 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3880 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3881 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3882 func Test_cindent_41() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3883 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3884 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3885 setl cino=k2s,(s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3886 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3887 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3888 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3889 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3890 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3891 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3892 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3893 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3894 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3895 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3896 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3897 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3898 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3899 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3900 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3901 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3902 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3903 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3904 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3905 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3906 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3907 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3908 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3909 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3910 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3911 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3912 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3913 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3914 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3915 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3916 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3917 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3918 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3919 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3920 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3921 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3922 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3923 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3924 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3925 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3926 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3927 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3928 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3929 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3930 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3931 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3932 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3933 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3934 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3935 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3936 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3937 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3938 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3939 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3940 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3941 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3942 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3943 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3944 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3945 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3946 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3947 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3948 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3949 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3950 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3951 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3952 func Test_cindent_42() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3953 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3954 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3955 setl cino=k2s,(s,U1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3956 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3957 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3958 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3959 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3960 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3961 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3962 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3963 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3964 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3965 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3966 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3967 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3968 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3969 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3970 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3971 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3972 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3973 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3974 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3975 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3976 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3977 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3978 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3979 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3980 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3981 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3982 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3983 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3984 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3985 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3986 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3987 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3988 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3989 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3990 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3991 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3992 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3993 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3994 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3995 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3996 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3997 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3998 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3999 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4000 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4001 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4002 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4003 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4004 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4005 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4006 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4007 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4008 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4009 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4010 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4011 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4012 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4013 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4014 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4015 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4016 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4017 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4018 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4019 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4020 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4021 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4022 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4023 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4024 func Test_cindent_43() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4025 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4026 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4027 setl cino=k2s,(0,W4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4028 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4029 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4030 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4031 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4032 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4033 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4034 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4035 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4036 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4037 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4038 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4039 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4040 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4041 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4042 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4043 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4044 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4045 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4046 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4047 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4048 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4049 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4050 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4051 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4052 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4053 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4054 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4055 a_long_line( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4056 argument, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4057 argument); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4058 a_short_line(argument, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4059 argument); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4060 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4061 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4062 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4063 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4064 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4065 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4066 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4067 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4068 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4069 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4070 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4071 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4072 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4073 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4074 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4075 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4076 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4077 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4078 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4079 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4080 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4081 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4082 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4083 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4084 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4085 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4086 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4087 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4088 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4089 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4090 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4091 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4092 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4093 a_long_line( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4094 argument, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4095 argument); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4096 a_short_line(argument, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4097 argument); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4098 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4099 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4100 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4101 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4102 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4103 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4104 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4105 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4106 func Test_cindent_44() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4107 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4108 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4109 setl cino=k2s,u2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4110 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4111 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4112 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4113 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4114 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4115 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4116 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4117 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4118 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4119 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4120 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4121 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4122 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4123 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4124 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4125 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4126 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4127 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4128 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4129 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4130 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4131 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4132 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4133 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4134 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4135 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4136 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4137 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4138 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4139 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4140 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4141 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4142 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4143 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4144 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4145 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4146 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4147 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4148 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4149 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4150 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4151 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4152 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4153 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4154 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4155 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4156 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4157 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4158 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4159 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4160 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4161 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4162 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4163 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4164 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4165 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4166 func Test_cindent_45() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4167 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4168 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4169 setl cino=k2s,(0,w1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4170 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4171 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4172 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4173 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4174 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4175 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4176 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4177 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4178 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4179 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4180 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4181 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4182 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4183 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4184 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4185 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4186 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4187 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4188 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4189 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4190 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4191 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4192 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4193 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4194 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4195 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4196 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4197 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4198 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4199 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4200 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4201 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4202 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4203 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4204 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4205 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4206 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4207 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4208 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4209 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4210 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4211 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4212 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4213 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4214 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4215 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4216 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4217 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4218 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4219 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4220 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4221 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4222 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4223 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4224 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4225 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4226 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4227 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4228 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4229 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4230 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4231 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4232 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4233 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4234 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4235 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4236 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4237 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4238 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4239 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4240 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4241 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4242 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4243 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4244 func Test_cindent_46() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4245 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4246 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4247 setl cino=k2,(s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4248 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4249 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4250 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4251 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4252 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4253 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4254 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4255 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4256 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4257 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4258 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4259 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4260 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4261 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4262 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4263 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4264 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4265 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4266 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4267 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4268 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4269 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4270 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4271 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4272 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4273 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4274 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4275 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4276 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4277 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4278 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4279 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4280 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4281 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4282 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4283 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4284 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4285 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4286 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4287 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4288 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4289 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4290 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4291 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4292 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4293 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4294 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4295 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4296 func Test_cindent_47() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4297 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4298 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4299 setl cino=N-s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4300 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4301 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4302 NAMESPACESTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4303 /* valid namespaces with normal indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4304 namespace |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4305 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4306 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4307 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4308 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4309 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4310 namespace /* test */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4311 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4312 11111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4313 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4314 namespace // test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4315 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4316 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4317 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4318 namespace |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4319 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4320 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4321 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4322 namespace test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4323 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4324 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4325 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4326 namespace test::cpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4327 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4328 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4329 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4330 namespace ::incorrectcpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4331 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4332 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4333 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4334 namespace test::incorrectcpp17:: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4335 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4336 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4337 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4338 namespace test:incorrectcpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4339 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4340 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4341 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4342 namespace test:::incorrectcpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4343 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4344 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4345 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4346 namespace{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4347 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4348 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4349 namespace test{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4350 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4351 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4352 namespace { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4353 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4354 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4355 namespace test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4356 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4357 namespace test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4358 22222222222222222; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4359 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4360 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4361 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4362 /* invalid namespaces use block indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4363 namespace test test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4364 111111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4365 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4366 namespace11111111111 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4367 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4368 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4369 namespace() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4370 1111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4371 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4372 namespace() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4373 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4374 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4375 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4376 namespace test test2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4377 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4378 1111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4379 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4380 namespace111111111 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4381 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4382 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4383 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4384 NAMESPACEEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4385 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4386 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4387 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4388 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4389 call search('^NAMESPACESTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4390 exe "normal =/^NAMESPACEEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4391 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4392 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4393 NAMESPACESTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4394 /* valid namespaces with normal indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4395 namespace |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4396 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4397 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4398 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4399 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4400 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4401 namespace /* test */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4402 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4403 11111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4404 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4405 namespace // test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4406 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4407 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4408 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4409 namespace |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4410 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4411 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4412 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4413 namespace test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4414 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4415 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4416 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4417 namespace test::cpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4418 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4419 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4420 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4421 namespace ::incorrectcpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4422 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4423 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4424 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4425 namespace test::incorrectcpp17:: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4426 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4427 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4428 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4429 namespace test:incorrectcpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4430 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4431 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4432 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4433 namespace test:::incorrectcpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4434 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4435 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4436 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4437 namespace{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4438 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4439 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4440 namespace test{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4441 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4442 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4443 namespace { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4444 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4445 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4446 namespace test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4447 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4448 namespace test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4449 22222222222222222; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4450 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4451 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4452 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4453 /* invalid namespaces use block indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4454 namespace test test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4455 111111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4456 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4457 namespace11111111111 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4458 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4459 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4460 namespace() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4461 1111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4462 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4463 namespace() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4464 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4465 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4466 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4467 namespace test test2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4468 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4469 1111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4470 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4471 namespace111111111 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4472 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4473 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4474 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4475 NAMESPACEEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4476 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4477 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4478 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4479 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4480 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4481 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4482 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4483 func Test_cindent_48() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4484 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4485 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4486 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4487 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4488 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4489 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4490 var bar = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4491 foo: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4492 that: this, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4493 some: ok, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4494 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4495 "bar":{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4496 a : 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4497 b: "123abc", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4498 x: 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4499 "y": 5 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4500 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4501 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4502 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4503 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4504 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4505 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4506 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4507 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4508 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4509 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4510 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4511 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4512 var bar = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4513 foo: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4514 that: this, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4515 some: ok, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4516 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4517 "bar":{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4518 a : 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4519 b: "123abc", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4520 x: 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4521 "y": 5 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4522 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4523 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4524 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4525 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4526 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4527 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4528 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4529 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4530 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4531 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4532 func Test_cindent_49() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4533 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4534 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4535 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4536 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4537 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4538 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4539 var foo = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4540 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4541 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4542 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4543 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4544 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4545 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4546 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4547 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4548 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4549 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4550 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4551 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4552 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4553 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4554 var foo = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4555 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4556 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4557 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4558 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4559 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4560 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4561 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4562 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4563 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4564 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4565 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4566 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4567 func Test_cindent_50() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4568 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4569 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4570 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4571 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4572 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4573 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4574 function bar() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4575 var foo = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4576 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4577 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4578 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4579 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4580 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4581 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4582 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4583 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4584 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4585 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4586 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4587 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4588 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4589 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4590 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4591 function bar() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4592 var foo = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4593 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4594 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4595 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4596 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4597 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4598 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4599 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4600 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4601 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4602 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4603 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4604 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4605 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4606 func Test_cindent_51() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4607 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4608 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4609 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4610 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4611 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4612 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4613 (function($){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4614 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4615 if (cond && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4616 cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4617 stmt; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4618 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4619 window.something.left = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4620 (width - 50 + offset) + "px"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4621 var class_name='myclass'; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4622 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4623 function private_method() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4624 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4625 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4626 var public_method={ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4627 method: function(options,args){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4628 private_method(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4629 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4630 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4631 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4632 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4633 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4634 $(this).data(class_name+'_public',$.extend({},{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4635 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4636 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4637 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4638 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4639 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4640 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4641 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4642 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4643 return true; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4644 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4645 }, options||{})); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4646 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4647 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4648 $.fn[class_name]=function() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4649 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4650 var _arguments=arguments; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4651 return this.each(function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4652 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4653 var options=$(this).data(class_name+'_public'); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4654 if (!options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4655 init.apply(this,_arguments); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4656 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4657 } else { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4658 var method=public_method[_arguments[0]]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4659 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4660 if (typeof(method)!='function') { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4661 console.log(class_name+' has no method "'+_arguments[0]+'"'); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4662 return false; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4663 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4664 _arguments[0]=options; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4665 method.apply(this,_arguments); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4666 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4667 }); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4668 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4669 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4670 })(jQuery); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4671 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4672 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4673 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4674 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4675 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4676 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4677 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4678 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4679 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4680 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4681 (function($){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4682 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4683 if (cond && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4684 cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4685 stmt; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4686 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4687 window.something.left = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4688 (width - 50 + offset) + "px"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4689 var class_name='myclass'; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4690 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4691 function private_method() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4692 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4693 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4694 var public_method={ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4695 method: function(options,args){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4696 private_method(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4697 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4698 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4699 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4700 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4701 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4702 $(this).data(class_name+'_public',$.extend({},{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4703 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4704 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4705 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4706 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4707 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4708 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4709 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4710 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4711 return true; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4712 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4713 }, options||{})); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4714 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4715 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4716 $.fn[class_name]=function() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4717 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4718 var _arguments=arguments; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4719 return this.each(function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4720 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4721 var options=$(this).data(class_name+'_public'); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4722 if (!options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4723 init.apply(this,_arguments); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4724 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4725 } else { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4726 var method=public_method[_arguments[0]]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4727 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4728 if (typeof(method)!='function') { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4729 console.log(class_name+' has no method "'+_arguments[0]+'"'); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4730 return false; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4731 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4732 _arguments[0]=options; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4733 method.apply(this,_arguments); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4734 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4735 }); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4736 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4737 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4738 })(jQuery); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4739 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4740 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4741 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4742 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4743 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4744 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4745 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4746 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4747 func Test_cindent_52() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4748 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4749 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4750 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4751 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4752 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4753 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4754 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4755 $(this).data(class_name+'_public',$.extend({},{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4756 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4757 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4758 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4759 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4760 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4761 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4762 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4763 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4764 return true; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4765 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4766 }, options||{})); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4767 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4768 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4769 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4770 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4771 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4772 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4773 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4774 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4775 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4776 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4777 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4778 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4779 $(this).data(class_name+'_public',$.extend({},{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4780 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4781 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4782 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4783 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4784 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4785 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4786 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4787 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4788 return true; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4789 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4790 }, options||{})); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4791 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4792 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4793 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4794 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4795 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4796 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4797 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4798 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4799 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4800 func Test_cindent_53() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4801 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4802 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4803 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4804 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4805 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4806 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4807 (function($){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4808 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4809 $(this).data(class_name+'_public',$.extend({},{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4810 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4811 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4812 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4813 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4814 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4815 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4816 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4817 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4818 return true; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4819 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4820 }, options||{})); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4821 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4822 })(jQuery); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4823 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4824 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4825 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4826 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4827 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4828 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4829 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4830 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4831 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4832 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4833 (function($){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4834 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4835 $(this).data(class_name+'_public',$.extend({},{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4836 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4837 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4838 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4839 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4840 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4841 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4842 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4843 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4844 return true; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4845 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4846 }, options||{})); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4847 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4848 })(jQuery); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4849 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4850 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4851 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4852 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4853 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4854 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4855 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4856 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4857 func Test_cindent_54() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4858 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4859 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4860 setl cino=j1,J1,+2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4861 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4862 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4863 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4864 // Results of JavaScript indent |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4865 // 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4866 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4867 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4868 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4869 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4870 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4871 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4872 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4873 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4874 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4875 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4876 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4877 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4878 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4879 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4880 // 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4881 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4882 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4883 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4884 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4885 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4886 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4887 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4888 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4889 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4890 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4891 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4892 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4893 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4894 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4895 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4896 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4897 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4898 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4899 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4900 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4901 // 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4902 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4903 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4904 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4905 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4906 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4907 /* comment 2 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4908 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4909 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4910 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4911 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4912 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4913 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4914 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4915 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4916 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4917 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4918 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4919 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4920 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4921 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4922 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4923 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4924 // 4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4925 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4926 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4927 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4928 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4929 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4930 var b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4931 var c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4932 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4933 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4934 // 5 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4935 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4936 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4937 [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4938 0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4939 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4940 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4941 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4942 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4943 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4944 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4945 // 6 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4946 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4947 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4948 [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4949 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4950 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4951 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4952 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4953 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4954 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4955 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4956 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4957 // 7 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4958 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4959 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4960 // [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4961 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4962 // 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4963 // ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4964 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4965 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4966 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4967 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4968 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4969 // 8 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4970 var x = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4971 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4972 var a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4973 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4974 c, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4975 d, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4976 e, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4977 f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4978 g, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4979 h, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4980 i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4981 }) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4982 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4983 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4984 // 9 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4985 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4986 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4987 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4988 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4989 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4990 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4991 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4992 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4993 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4994 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4995 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4996 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4997 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4998 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4999 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5000 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5001 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5002 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5003 // 10 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5004 var a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5005 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5006 c, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5007 d, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5008 e, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5009 f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5010 g, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5011 h, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5012 i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5013 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5014 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5015 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5016 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5017 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5018 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5019 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5020 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5021 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5022 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5023 // Results of JavaScript indent |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5024 // 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5025 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5026 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5027 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5028 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5029 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5030 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5031 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5032 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5033 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5034 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5035 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5036 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5037 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5038 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5039 // 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5040 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5041 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5042 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5043 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5044 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5045 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5046 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5047 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5048 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5049 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5050 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5051 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5052 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5053 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5054 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5055 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5056 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5057 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5058 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5059 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5060 // 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5061 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5062 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5063 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5064 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5065 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5066 /* comment 2 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5067 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5068 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5069 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5070 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5071 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5072 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5073 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5074 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5075 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5076 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5077 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5078 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5079 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5080 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5081 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5082 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5083 // 4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5084 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5085 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5086 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5087 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5088 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5089 var b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5090 var c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5091 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5092 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5093 // 5 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5094 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5095 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5096 [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5097 0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5098 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5099 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5100 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5101 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5102 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5103 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5104 // 6 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5105 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5106 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5107 [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5108 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5109 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5110 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5111 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5112 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5113 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5114 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5115 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5116 // 7 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5117 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5118 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5119 // [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5120 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5121 // 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5122 // ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5123 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5124 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5125 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5126 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5127 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5128 // 8 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5129 var x = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5130 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5131 var a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5132 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5133 c, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5134 d, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5135 e, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5136 f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5137 g, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5138 h, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5139 i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5140 }) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5141 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5142 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5143 // 9 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5144 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5145 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5146 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5147 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5148 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5149 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5150 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5151 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5152 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5153 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5154 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5155 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5156 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5157 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5158 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5159 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5160 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5161 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5162 // 10 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5163 var a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5164 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5165 c, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5166 d, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5167 e, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5168 f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5169 g, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5170 h, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5171 i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5172 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5173 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5174 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5175 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5176 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5177 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5178 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5179 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5180 func Test_cindent_55() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5181 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5182 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5183 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5184 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5185 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5186 /* start of define */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5187 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5188 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5189 #define AAA \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5190 BBB\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5191 CCC |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5192 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5193 #define CNT \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5194 1 + \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5195 2 + \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5196 4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5197 /* end of define */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5198 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5199 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5200 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5201 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5202 call search('start of define') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5203 exe "normal =/end of define\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5204 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5205 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5206 /* start of define */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5207 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5208 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5209 #define AAA \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5210 BBB\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5211 CCC |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5212 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5213 #define CNT \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5214 1 + \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5215 2 + \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5216 4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5217 /* end of define */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5218 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5219 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5220 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5221 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5222 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5223 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5224 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5225 func Test_cindent_56() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5226 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5227 setl cindent ts=4 sw=4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5228 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5229 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5230 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5231 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5232 a = second/*bug*/*line; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5233 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5234 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5235 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5236 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5237 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5238 call search('a = second') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5239 normal ox |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5240 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5241 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5242 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5243 a = second/*bug*/*line; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5244 x |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5245 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5246 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5247 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5248 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5249 call assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5250 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5251 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5252 |
19104
9f4648953f1a
patch 8.2.0112: illegal memory access when using 'cindent'
Bram Moolenaar <Bram@vim.org>
parents:
17918
diff
changeset
|
5253 " this was going beyond the end of the line. |
9f4648953f1a
patch 8.2.0112: illegal memory access when using 'cindent'
Bram Moolenaar <Bram@vim.org>
parents:
17918
diff
changeset
|
5254 func Test_cindent_case() |
9f4648953f1a
patch 8.2.0112: illegal memory access when using 'cindent'
Bram Moolenaar <Bram@vim.org>
parents:
17918
diff
changeset
|
5255 new |
19195
2ef19eed524a
patch 8.2.0156: various typos in source files and tests
Bram Moolenaar <Bram@vim.org>
parents:
19104
diff
changeset
|
5256 call setline(1, 'case x: // x') |
19104
9f4648953f1a
patch 8.2.0112: illegal memory access when using 'cindent'
Bram Moolenaar <Bram@vim.org>
parents:
17918
diff
changeset
|
5257 set cindent |
9f4648953f1a
patch 8.2.0112: illegal memory access when using 'cindent'
Bram Moolenaar <Bram@vim.org>
parents:
17918
diff
changeset
|
5258 norm! f:a: |
19195
2ef19eed524a
patch 8.2.0156: various typos in source files and tests
Bram Moolenaar <Bram@vim.org>
parents:
19104
diff
changeset
|
5259 call assert_equal('case x:: // x', getline(1)) |
2ef19eed524a
patch 8.2.0156: various typos in source files and tests
Bram Moolenaar <Bram@vim.org>
parents:
19104
diff
changeset
|
5260 set cindent& |
19104
9f4648953f1a
patch 8.2.0112: illegal memory access when using 'cindent'
Bram Moolenaar <Bram@vim.org>
parents:
17918
diff
changeset
|
5261 bwipe! |
9f4648953f1a
patch 8.2.0112: illegal memory access when using 'cindent'
Bram Moolenaar <Bram@vim.org>
parents:
17918
diff
changeset
|
5262 endfunc |
9f4648953f1a
patch 8.2.0112: illegal memory access when using 'cindent'
Bram Moolenaar <Bram@vim.org>
parents:
17918
diff
changeset
|
5263 |
19613
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5264 " Test for changing multiple lines (using c) with cindent |
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5265 func Test_cindent_change_multline() |
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5266 new |
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5267 setlocal cindent |
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5268 call setline(1, ['if (a)', '{', ' i = 1;', '}']) |
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5269 normal! jc3jm = 2; |
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5270 call assert_equal("\tm = 2;", getline(2)) |
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5271 close! |
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5272 endfunc |
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5273 |
20621
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5274 func Test_cindent_pragma() |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5275 new |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5276 setl cindent ts=4 sw=4 |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5277 setl cino=Ps |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5278 |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5279 let code =<< trim [CODE] |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5280 { |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5281 #pragma omp parallel |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5282 { |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5283 #pragma omp task |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5284 foo(); |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5285 # pragma omp taskwait |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5286 } |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5287 } |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5288 [CODE] |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5289 |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5290 call append(0, code) |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5291 normal gg |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5292 normal =G |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5293 |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5294 let expected =<< trim [CODE] |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5295 { |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5296 #pragma omp parallel |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5297 { |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5298 #pragma omp task |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5299 foo(); |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5300 # pragma omp taskwait |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5301 } |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5302 } |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5303 |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5304 [CODE] |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5305 |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5306 call assert_equal(expected, getline(1, '$')) |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5307 enew! | close |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5308 endfunc |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5309 |
11087
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
5310 " vim: shiftwidth=2 sts=2 expandtab |