Mercurial > vim
annotate src/testdir/test_cindent.vim @ 27447:4050f0554902 v8.2.4252
patch 8.2.4252: generating the normal command table at runtime is inefficient
Commit: https://github.com/vim/vim/commit/4dc0dd869972ddafc7d9ee5ea765645b818a6dc9
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sat Jan 29 13:06:40 2022 +0000
patch 8.2.4252: generating the normal command table at runtime is inefficient
Problem: Generating the normal command table at runtime is inefficient.
Solution: Generate the table with a Vim script and put it in a header file.
(Yegappan Lakshmanan, closes #9648)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 29 Jan 2022 14:15:04 +0100 |
parents | 1095fd0dc362 |
children | 8bc8071928ed |
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 } |
26694
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
999 inline namespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1000 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1001 } |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1002 inline /* test */ namespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1003 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1004 } |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1005 inline/* test */namespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1006 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1007 } |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1008 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1009 /* invalid namespaces use block indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1010 namespace test test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1011 111111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1012 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1013 namespace11111111111 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1014 111111111111; |
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 namespace() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1017 1111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1018 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1019 namespace() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1020 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1021 111111111111111111; |
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 namespace test test2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1024 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1025 1111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1026 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1027 namespace111111111 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1028 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1029 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1030 } |
26694
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1031 inlinenamespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1032 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1033 } |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1034 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1035 void getstring() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1036 /* Raw strings */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1037 const char* s = R"( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1038 test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1039 # comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1040 field: 123 |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1044 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1045 void getstring() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1046 const char* s = R"foo( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1047 test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1048 # comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1049 field: 123 |
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 )foo"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1052 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1053 |
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 int a[4] = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1056 [0] = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1057 [1] = 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1058 [2] = 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1059 [3] = 3, |
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 } |
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 a = b[2] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1065 + 3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1066 } |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1069 if (1) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1070 /* aaaaa |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1071 * bbbbb |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1072 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1073 a = 1; |
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 void func() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1077 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1078 switch (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1079 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1080 case (bar): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1081 if (baz()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1082 quux(); |
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 case (shmoo): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1085 if (!bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1086 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1087 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1088 case (foo1): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1089 switch (bar) |
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 case baz: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1092 baz_f(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1093 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1094 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1095 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1096 default: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1097 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1098 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1099 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1100 } |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1103 /* end of AUTO */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1104 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1107 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1108 call search('start of AUTO') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1109 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
|
1110 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1111 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1112 /* 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
|
1113 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1114 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1115 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1116 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1117 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1118 |
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 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1121 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1122 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1123 cmd2; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1126 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1127 if (test) |
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 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1130 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1131 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1132 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1133 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1134 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1135 if (test) |
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 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1138 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1139 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1140 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1141 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1142 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1143 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1144 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1145 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1146 cmd2; |
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 |
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 while (this) |
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 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1153 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1154 cmd2; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1157 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1158 if (test) |
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 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 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1164 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1165 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1166 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1167 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1168 if (test) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1169 cmd; |
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 if (test) cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1173 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1174 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1175 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1176 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1177 for (blah) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1178 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1179 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1180 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1181 cmd3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1182 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1183 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1184 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1185 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1186 for (blah) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1187 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1188 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1189 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1190 cmd3; |
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 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1193 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1194 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1195 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1196 cmd3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1197 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1198 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1199 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1200 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1201 /* 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
|
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 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1205 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1206 asdfasd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1207 while (cond); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1208 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1209 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1210 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1211 while (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1212 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1213 while (asdf); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1216 /* 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
|
1217 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1218 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
|
1219 aal;sdkjf ( ;asldfkja;sldfk |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1220 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
|
1221 line up here; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1222 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1223 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1224 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1225 /* C++ tests: */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1226 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1227 // 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
|
1228 // { |
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 /* 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
|
1232 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1233 i = 99 + 14325 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1234 21345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1235 21345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1236 21345 + ( 21345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1237 21345) + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1238 2345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1239 1234; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1240 c = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1241 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1242 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1243 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1244 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
|
1245 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1246 here */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1247 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1248 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1249 if (testing && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1250 not a joke || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1251 line up here) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1252 hay; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1253 if (testing && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1254 (not a joke || testing |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1255 )line up here) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1256 hay; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1257 if (testing && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1258 (not a joke || testing |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1259 line up here)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1260 hay; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1261 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1262 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1263 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1264 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1265 switch (c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1266 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1267 case xx: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1268 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1269 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1270 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1271 asdfasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1272 while (asdf); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1273 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1274 asdfasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1275 while (cond); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1276 case yy: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1277 case xx: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1278 case zz: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1279 testing; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1283 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1284 if (cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1285 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1286 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1287 else |
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 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1290 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1291 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1292 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1293 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1294 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
|
1295 alsdkfj (asldk;fj |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1296 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
|
1297 ;laksjfd ;lsakdjf ;alskdf asd) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1298 asdfasdf;))) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1299 asdfasdf; |
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 int |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1303 func(a, b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1304 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1305 int c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1306 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1307 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1308 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1309 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1310 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1311 (c2 || c3) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1312 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1313 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1314 |
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 while (asd) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1317 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1318 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1319 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1320 if (that) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1321 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1322 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1323 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1324 cdasd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1325 while (as |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1326 df); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1327 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1328 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1329 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1330 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1331 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1332 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1333 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1334 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1335 } |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1338 s = "/*"; b = ';' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1339 s = "/*"; b = ';'; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1340 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1341 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1342 |
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 switch (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1345 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1346 case a: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1347 switch (t) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1348 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1349 case 1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1350 cmd; |
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 2: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1353 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1354 break; |
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 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1357 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1358 case b: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1359 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1360 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1361 cmd; |
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 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1364 case c: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1365 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1366 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1367 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1368 case d: if (cond && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1369 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
|
1370 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1371 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1372 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1373 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1374 } |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1378 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
|
1379 (bp_to->b_p_initialized || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1380 (!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
|
1381 return; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1382 label : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1383 asdf = asdf ? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1384 asdf : asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1385 asdf = asdf ? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1386 asdf: asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1387 } |
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 /* 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
|
1390 /* : 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
|
1391 /* : 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
|
1392 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1393 char *(array[100]) = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1394 "testje", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1395 "foo", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1396 "bar", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1397 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1398 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1399 enum soppie |
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 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1402 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1403 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1404 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1405 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1406 typedef enum 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 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1409 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1410 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1411 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1412 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1413 static enum |
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 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1416 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1417 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1418 } soppie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1419 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1420 public static enum |
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 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1423 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1424 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1425 } soppie; |
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 static private enum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1428 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1429 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1430 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1431 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1432 } soppie; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1435 int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1436 b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1437 } |
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 struct Type |
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 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1443 char *str; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1444 } var[] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1445 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1446 0, "zero", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1447 1, "one", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1448 2, "two", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1449 3, "three" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1450 }; |
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 float matrix[3][3] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1453 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1454 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1455 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1456 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1457 2 |
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 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1461 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1462 5 |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1465 6, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1466 7, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1467 8 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1468 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1469 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1470 } |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1473 /* blah ( blah */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1474 /* where does this go? */ |
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 /* blah ( blah */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1477 cmd; |
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 /* comment */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1481 arg2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1482 a; |
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 b; |
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 c; /* Hey, NOW it indents?! */ |
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 } |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1491 func(arg1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1492 arg2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1493 arg3); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1494 /* 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
|
1495 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1496 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1497 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1498 main () |
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 if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1501 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1502 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1503 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1504 if (cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1505 a = c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1506 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1507 if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1508 a = d; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1509 return; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1512 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1513 case 2: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1514 asdfasdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1515 aasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1516 a = 9; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1517 case 3: if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1518 aasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1519 a = 9; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1520 case 4: x = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1521 y = 2; |
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 label: if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1524 here; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1525 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1526 label: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1527 asdfasdf) |
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 label: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1532 asdfasdf) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1533 there; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1536 label: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1537 asdfasdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1538 there; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1542 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1543 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
|
1544 */ |
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 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1547 hello with ":set comments= cino=" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1548 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1549 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1550 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1551 |
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 if (a < b) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1554 a = a + 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1555 } else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1556 a = a + 2; |
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 if (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1559 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1560 testing; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1561 } while (asdfasdf); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1562 a = b + 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1563 asdfasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1564 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1565 |
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 for ( int i = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1568 i < 10; i++ ) |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1571 i = 0; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1574 class bob |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1575 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1576 int foo() {return 1;} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1577 int bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1578 } |
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 main() |
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 while(1) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1583 if (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1584 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1585 bar; |
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 else { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1588 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1589 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1590 misplacedline; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1591 } |
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 if (clipboard.state == SELECT_DONE |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1595 && ((row == clipboard.start.lnum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1596 && col >= clipboard.start.col) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1597 || row > clipboard.start.lnum)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1598 } |
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 if (1) {i += 4;} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1602 where_am_i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1603 return 0; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1608 } // sdf(asdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1609 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1610 asd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1611 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1612 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1613 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1614 label1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1615 label2: |
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 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
|
1620 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
|
1621 f() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1622 for ( i = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1623 i < m; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1624 /* c */ i++ ) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1625 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1626 } |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1629 |
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 f1(/*comment*/); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1632 f2(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1633 } |
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 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1637 if (foo) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1638 } else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1639 ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1640 } while (foo); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1641 foo(); // was wrong |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1642 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1643 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1644 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
|
1645 void func() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1646 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1647 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1648 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1649 char *tab[] = {"aaa", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1650 "};", /* }; */ NULL} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1651 int indented; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1652 {} |
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 char *a[] = {"aaa", "bbb", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1655 "ccc", NULL}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1656 // here |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1657 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1658 char *tab[] = {"aaa", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1659 "xx", /* xx */}; /* asdf */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1660 int not_indented; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1661 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1662 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1663 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1664 switch (bla) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1665 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1666 case 1: if (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1667 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1668 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1669 } while (boo); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1670 wrong; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1673 int foo, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1674 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1675 int foo; |
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 #if defined(foo) \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1678 && defined(bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1679 char * xx = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1680 foo\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1681 bor"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1682 int x; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1683 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1684 char *foo = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1685 asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1686 asdf", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1687 *bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1688 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1689 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1690 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1691 #if defined(foo) \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1692 && defined(bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1693 char *foo = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1694 asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1695 asdf", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1696 *bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1697 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1698 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1699 char *foo = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1700 asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1701 asdf", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1702 *bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1703 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1704 #endif |
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 #endif |
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 int y; // comment |
26516
9596c652420b
patch 8.2.3787: no proper formatting of a C line comment after a statement
Bram Moolenaar <Bram@vim.org>
parents:
26187
diff
changeset
|
1709 // comment |
9596c652420b
patch 8.2.3787: no proper formatting of a C line comment after a statement
Bram Moolenaar <Bram@vim.org>
parents:
26187
diff
changeset
|
1710 |
9596c652420b
patch 8.2.3787: no proper formatting of a C line comment after a statement
Bram Moolenaar <Bram@vim.org>
parents:
26187
diff
changeset
|
1711 // comment |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1712 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1713 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1714 Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1715 int b ) : BaseClass(a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1716 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1717 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1718 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1719 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1720 void foo() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1721 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1722 char one, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1723 two; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1724 struct bla piet, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1725 jan; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1726 enum foo kees, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1727 jannie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1728 static unsigned sdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1729 krap; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1730 unsigned int piet, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1731 jan; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1732 int |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1733 kees, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1734 jan; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1735 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1736 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1737 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1738 t(int f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1739 int d); // ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1740 d(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1741 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1742 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1743 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1744 int b |
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 BaseClass(a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1747 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1748 c), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1749 mMember(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 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1754 int b ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1755 BaseClass(a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1756 { |
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 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1760 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
|
1761 member(b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1762 { |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1765 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
|
1766 : aa(a), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1767 bb(b), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1768 cc(c) |
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 } |
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 class CAbc : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1773 public BaseClass1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1774 protected BaseClass2 |
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 int Test() { return FALSE; } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1777 int Test1() { return TRUE; } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1778 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1779 CAbc(int a, int b ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1780 BaseClass(a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1781 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1782 switch(xxx) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1783 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1784 case abc: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1785 asdf(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1786 break; |
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 case 999: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1789 baer(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1790 break; |
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 |
19195
2ef19eed524a
patch 8.2.0156: various typos in source files and tests
Bram Moolenaar <Bram@vim.org>
parents:
19104
diff
changeset
|
1794 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
|
1795 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1796 protected: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1797 void testfall(); |
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 class CAbc : public BaseClass1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1801 protected BaseClass2 |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1805 static struct |
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 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1808 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1809 } variable[COUNT] = |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1812 123, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1813 456 |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1816 123, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1817 456 |
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 }; |
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 static struct |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1822 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1823 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1824 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1825 } variable[COUNT] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1826 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1827 { 123, 456 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1828 { 123, 456 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1829 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1830 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1831 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
|
1832 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1833 if ((0 |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1847 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1848 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1849 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1850 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1851 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1852 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1853 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1854 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1855 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1856 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1857 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1858 && 1)) break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1859 } |
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 foo() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1862 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1863 a = cond ? foo() : asdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1864 + asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1865 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1866 a = cond ? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1867 foo() : asdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1868 + asdf; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1871 int main(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1872 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1873 if (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1874 if (b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1875 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1876 else 3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1877 next_line_of_code(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1878 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1879 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1880 barry() |
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 Foo::Foo (int one, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1883 int two) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1884 : something(4) |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1887 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1888 barry() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1889 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1890 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
|
1891 : something(4) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1892 {} |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1895 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1896 int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1897 ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1898 BaseClass(a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1899 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1900 c), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1901 mMember(b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1902 { |
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 int main () |
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 if (lala) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1907 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1908 ++(*lolo); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1909 while (lili |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1910 && lele); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1911 lulu; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1912 } |
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 int main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1915 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1916 switch (c) |
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 case 'c': if (cond) |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1921 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1922 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1923 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1924 main() |
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 (void) MyFancyFuasdfadsfnction( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1927 argument); |
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 main() |
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 char foo[] = "/*"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1933 /* as |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1934 df */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1935 hello |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1938 /* valid namespaces with normal indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1939 namespace |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1942 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1943 } |
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 11111111111111111; |
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 // test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1950 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1951 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1952 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1953 namespace |
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 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1956 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1957 namespace test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1958 { |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1961 namespace{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1962 111111111111111111; |
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 namespace test{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1965 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1966 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1967 namespace { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1968 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1969 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1970 namespace test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1971 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1972 namespace test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1973 22222222222222222; |
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 } |
26694
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1976 inline namespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1977 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1978 } |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1979 inline /* test */ namespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1980 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1981 } |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1982 inline/* test */namespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1983 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
1984 } |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1985 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1986 /* invalid namespaces use block indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1987 namespace test test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1988 111111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1989 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1990 namespace11111111111 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1991 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1992 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1993 namespace() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1994 1111111111111; |
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 namespace() |
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 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1999 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2000 namespace test test2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2001 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2002 1111111111111111111; |
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 namespace111111111 |
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 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2007 } |
26694
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
2008 inlinenamespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
2009 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
2010 } |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2011 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2012 void getstring() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2013 /* Raw strings */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2014 const char* s = R"( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2015 test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2016 # comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2017 field: 123 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2018 } |
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 void getstring() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2023 const char* s = R"foo( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2024 test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2025 # comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2026 field: 123 |
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 )foo"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2029 } |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2032 int a[4] = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2033 [0] = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2034 [1] = 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2035 [2] = 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2036 [3] = 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2037 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2038 } |
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 a = b[2] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2042 + 3; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2045 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2046 if (1) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2047 /* aaaaa |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2048 * bbbbb |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2049 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2050 a = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2051 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2052 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2053 void func() |
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 switch (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2056 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2057 case (bar): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2058 if (baz()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2059 quux(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2060 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2061 case (shmoo): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2062 if (!bar) |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2065 case (foo1): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2066 switch (bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2067 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2068 case baz: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2069 baz_f(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2070 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2071 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2072 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2073 default: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2074 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2075 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2076 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2077 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2078 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2079 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2080 /* end of AUTO */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2081 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2082 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2083 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2084 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
|
2085 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2086 endfunc |
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 func Test_cindent_2() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2089 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2090 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
|
2091 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
|
2092 let &wm = &columns - 20 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2093 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2094 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
|
2095 { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2096 |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2097 /* this is |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2098 * 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
|
2099 * comment |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2100 */ |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2101 /* 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
|
2102 } |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2103 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2104 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2105 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2106 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2107 call search('serious', 'e') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2108 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
|
2109 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2110 let expected =<< 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 /* this is |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2114 * a real serious |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2115 * about life, the |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2116 * universe, and the |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2117 * rest important big |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2118 * comment |
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 /* 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
|
2121 } |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2124 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2125 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
|
2126 set wm& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2127 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2128 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2129 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2130 func Test_cindent_3() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2131 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2132 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
|
2133 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2134 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2135 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2136 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2137 * 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
|
2138 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2139 |
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 * what happens here? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2142 */ |
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 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2145 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
|
2146 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2147 /* how about |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2148 this one */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2149 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2150 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2153 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2154 call search('comments') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2155 normal joabout life |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2156 call search('happens') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2157 normal jothere |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2158 call search('below') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2159 normal oline |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2160 call search('this') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2161 normal Ohello |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2162 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2163 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2164 { |
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 * 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
|
2167 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2168 about life |
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 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2171 * what happens here? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2172 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2173 there |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2174 |
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 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
|
2177 line |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2178 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2179 /* how about |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2180 hello |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2181 this one */ |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2184 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2185 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2186 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
|
2187 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2188 endfunc |
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 func Test_cindent_4() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2191 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2192 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
|
2193 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2194 let code =<< trim [CODE] |
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 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
|
2197 + vec[1] * vec[1] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2198 + vec2[2] * vec[2]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2199 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2200 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2201 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2202 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2203 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2204 call search('vec2') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2205 normal == |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2206 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2207 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2208 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2209 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
|
2210 + vec[1] * vec[1] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2211 + vec2[2] * vec[2]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2212 } |
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 [CODE] |
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 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
|
2217 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2218 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2219 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2220 func Test_cindent_5() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2221 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2222 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
|
2223 setl cino=}4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2224 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2225 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2226 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2227 asdf asdflkajds f; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2228 if (tes & ting) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2229 asdf asdf asdf ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2230 asdfa sdf asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2231 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2232 testing1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2233 if (tes & ting) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2234 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2235 asdf asdf asdf ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2236 asdfa sdf asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2237 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2238 testing2; |
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 append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2243 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2244 call search('testing1') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2245 exe "normal k2==/testing2\<CR>" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2246 normal k2== |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2247 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2248 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2249 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2250 asdf asdflkajds f; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2251 if (tes & ting) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2252 asdf asdf asdf ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2253 asdfa sdf asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2254 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2255 testing1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2256 if (tes & ting) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2257 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2258 asdf asdf asdf ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2259 asdfa sdf asdf; |
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 testing2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2262 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2263 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2264 [CODE] |
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 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
|
2267 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2268 endfunc |
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 func Test_cindent_6() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2271 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2272 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
|
2273 setl cino=(0,)20 |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2276 main ( int first_par, /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2277 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2278 * first par |
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 int second_par /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2281 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2282 * second par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2283 */ |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2286 func( first_par, /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2287 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2288 * first par |
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 second_par /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2291 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2292 * second par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2293 */ |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2296 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2297 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2300 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2301 call search('main') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2302 normal =][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2303 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2304 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2305 main ( int first_par, /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2306 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2307 * first par |
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 int second_par /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2310 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2311 * second par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2312 */ |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2315 func( first_par, /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2316 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2317 * first par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2318 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2319 second_par /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2320 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2321 * second par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2322 */ |
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 } |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2328 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2329 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
|
2330 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2331 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2332 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2333 func Test_cindent_7() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2334 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2335 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
|
2336 setl cino=es,n0s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2337 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2338 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2339 main(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2340 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2341 /* 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
|
2342 if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2343 foo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2344 else |
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 bar(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2347 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2348 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2349 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2350 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2351 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2352 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2353 call search('main') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2354 normal =][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2355 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2356 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2357 main(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2358 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2359 /* 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
|
2360 if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2361 foo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2362 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2363 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2364 bar(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2365 } |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2368 [CODE] |
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 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
|
2371 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2372 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2373 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2374 func Test_cindent_8() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2375 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2376 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
|
2377 setl cino= |
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 let code =<< trim [CODE] |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2382 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2383 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2384 if () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2385 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2386 if () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2387 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2388 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2389 asdf; |
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 } while (); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2392 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
|
2393 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2394 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2395 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2396 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2397 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2398 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2399 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2400 let expected =<< trim [CODE] |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2403 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2404 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2405 if () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2406 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2407 if () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2408 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2409 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2410 asdf; |
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 } while (); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2413 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
|
2414 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2415 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2416 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2417 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2418 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
|
2419 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2420 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2421 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2422 func Test_cindent_9() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2423 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2424 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
|
2425 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2426 let code =<< trim [CODE] |
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 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2429 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2430 if ( k() ) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2431 l(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2432 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2433 } else { /* Start (two words) end */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2434 m(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2435 } |
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 n(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2438 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2439 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2442 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2443 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2444 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2445 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2446 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2447 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2448 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2449 if ( k() ) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2450 l(); |
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 } else { /* Start (two words) end */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2453 m(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2454 } |
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(); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2459 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2460 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2461 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
|
2462 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2463 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2464 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2465 func Test_cindent_10() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2466 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2467 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
|
2468 setl cino={s,e-s |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2471 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2472 void f() |
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 if ( k() ) |
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 l(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2477 } else { /* Start (two words) end */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2478 m(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2479 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2480 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
|
2481 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2482 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2483 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2484 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2485 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2486 normal ]]=][ |
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 expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2489 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2490 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2491 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2492 if ( k() ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2493 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2494 l(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2495 } else { /* Start (two words) end */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2496 m(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2497 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2498 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
|
2499 } |
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 [CODE] |
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 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
|
2504 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2505 endfunc |
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 func Test_cindent_11() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2508 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2509 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
|
2510 setl cino={s,fs |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2511 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2512 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2513 void bar(void) |
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 static array[2][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 { 1, 2 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2518 { 3, 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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2521 while (a) |
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 foo(&a); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2524 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2525 |
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 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2528 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2529 a = a + 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2530 } |
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 b = a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2533 } |
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 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2536 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2537 a = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2538 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2539 b = 2; |
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 c = 3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2542 d = 4; |
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 /* foo */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2545 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2548 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2549 exe "normal ]]=/ foo\<CR>" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2550 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2551 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2552 void bar(void) |
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 static array[2][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 { 1, 2 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2557 { 3, 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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2560 while (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2561 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2562 foo(&a); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2563 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2564 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2565 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2566 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2567 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2568 a = a + 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2569 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2570 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2571 b = a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2572 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2573 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2574 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2575 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2576 a = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2577 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2578 b = 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2579 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2580 c = 3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2581 d = 4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2582 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2583 /* foo */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2584 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2585 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2586 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2587 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
|
2588 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2589 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2590 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2591 func Test_cindent_12() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2592 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2593 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
|
2594 setl cino= |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2595 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2596 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2597 a() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2598 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2599 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2600 a = a + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2601 a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2602 } 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
|
2603 if ( a ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2604 a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2605 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2606 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2607 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2608 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2609 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2610 call search('while') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2611 normal ohere |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2612 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2613 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2614 a() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2615 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2616 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2617 a = a + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2618 a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2619 } 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
|
2620 here |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2621 if ( a ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2622 a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2623 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2624 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2625 [CODE] |
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 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
|
2628 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2629 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2630 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2631 func Test_cindent_13() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2632 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2633 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
|
2634 setl cino= com= |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2635 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2636 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2637 a() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2638 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2639 label1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2640 /* hmm */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2641 // comment |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2644 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2645 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2646 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2647 call search('comment') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2648 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
|
2649 \ "f(/*com*/);\rif (/*com*/)\rcmd();" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2650 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2651 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2652 a() |
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 label1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2655 /* hmm */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2656 // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2657 label2: b(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2658 label3 /* post */: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2659 /* pre */ label4: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2660 f(/*com*/); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2661 if (/*com*/) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2662 cmd(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2663 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2664 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2665 [CODE] |
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 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
|
2668 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2669 endfunc |
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 func Test_cindent_14() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2672 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2673 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
|
2674 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
|
2675 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2676 let code =<< trim [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 * A simple comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2679 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2680 |
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 ** A different comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2683 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2684 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2685 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2686 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2687 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2688 call search('simple') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2689 normal =5j |
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 let expected =<< trim [CODE] |
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 simple 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 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2697 ** A different comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2698 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2699 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2700 [CODE] |
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 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
|
2703 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2704 endfunc |
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 func Test_cindent_15() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2707 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2708 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
|
2709 setl cino=c0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2710 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
|
2711 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2712 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2713 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2714 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2715 |
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 A comment. |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2718 *********/ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2719 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2720 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2721 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2722 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2723 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2724 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2727 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2728 { |
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 A comment. |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2734 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2735 [CODE] |
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 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
|
2738 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2739 endfunc |
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 func Test_cindent_16() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2742 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2743 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
|
2744 setl cino=c0,C1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2745 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
|
2746 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2747 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2748 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2749 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2750 |
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 A comment. |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2753 *********/ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2754 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2755 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2758 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2759 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2760 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2761 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2762 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2763 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2764 |
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 A comment. |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2769 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2770 [CODE] |
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 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
|
2773 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2774 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2775 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2776 func Test_cindent_17() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2777 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2778 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
|
2779 setl cino= |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2782 void f() |
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 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2785 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2786 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2787 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2788 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2789 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2790 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2791 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2792 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2793 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2794 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2797 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2798 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2799 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2800 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2801 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2802 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2803 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2804 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2805 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2806 [CODE] |
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 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
|
2809 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2810 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2811 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2812 func Test_cindent_18() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2813 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2814 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
|
2815 setl cino=(s |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2818 void f() |
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 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2821 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2822 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2823 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2824 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2825 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2826 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2827 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2828 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2829 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2830 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2833 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2834 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2835 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2836 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2837 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2838 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2839 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2840 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2841 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2842 [CODE] |
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 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
|
2845 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2846 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2847 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2848 func Test_cindent_19() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2849 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2850 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
|
2851 set cino=(s,U1 |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2854 void f() |
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 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2857 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2858 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2859 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2860 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2861 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2862 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2863 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2864 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2865 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2866 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2869 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2870 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2871 c = c1 && |
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 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2874 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2875 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2876 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2877 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2878 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2879 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2880 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
|
2881 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2882 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2883 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2884 func Test_cindent_20() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2885 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2886 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
|
2887 setl cino=(0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2888 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2889 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2890 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2891 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2892 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2893 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2894 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2895 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2896 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2897 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2900 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2901 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2902 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2903 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2904 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2905 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2906 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2907 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2908 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2909 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2910 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2911 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2912 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2913 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2914 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
|
2915 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2916 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2917 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2918 func Test_cindent_21() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2919 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2920 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
|
2921 setl cino=(0,w1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2922 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2923 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2924 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2925 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2926 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2927 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2928 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2929 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2930 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2931 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2934 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2935 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2936 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2937 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2938 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2939 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2940 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2941 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2942 || c3)) |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2946 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2947 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2948 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
|
2949 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2950 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2951 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2952 func Test_cindent_22() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2953 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2954 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
|
2955 setl cino=(s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2956 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2957 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2958 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2959 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2960 c = c1 && ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2961 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2962 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2963 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2964 if ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2965 c1 && c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2966 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2967 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2968 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2969 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2970 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2971 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2972 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2973 normal ]]=][ |
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 expected =<< 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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2988 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2989 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2990 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
|
2991 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2992 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2993 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2994 func Test_cindent_23() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2995 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2996 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
|
2997 setl cino=(s,m1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2998 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2999 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3000 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3001 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3002 c = c1 && ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3003 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3004 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3005 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3006 if ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3007 c1 && c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3008 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3009 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3010 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3011 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3012 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3013 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3014 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3015 normal ]]=][ |
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 expected =<< 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 c = c1 && ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3021 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3022 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3023 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3024 if ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3025 c1 && c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3026 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3027 foo; |
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 assert_equal(expected, getline(1, '$')) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3033 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3034 endfunc |
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 func Test_cindent_24() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3037 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3038 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
|
3039 setl cino=b1 |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3042 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3043 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3044 switch (x) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3045 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3046 case 1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3047 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3048 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3049 default: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3050 a = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3051 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3052 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3053 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3054 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3057 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3058 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3059 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3060 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3061 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3062 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3063 switch (x) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3064 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3065 case 1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3066 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3067 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3068 default: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3069 a = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3070 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3071 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3072 } |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3075 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3076 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
|
3077 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3078 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3079 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3080 func Test_cindent_25() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3081 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3082 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
|
3083 setl cino=(0,W5 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3084 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3085 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3086 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3087 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3088 invokeme( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3089 argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3090 ment); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3091 invokeme( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3092 argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3093 ment |
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 invokeme(argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3096 ment |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3099 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3100 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3101 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3102 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3103 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3104 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3105 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3106 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3107 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3108 invokeme( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3109 argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3110 ment); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3111 invokeme( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3112 argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3113 ment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3114 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3115 invokeme(argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3116 ment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3117 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3118 } |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3121 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3122 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
|
3123 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3124 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3125 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3126 func Test_cindent_26() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3127 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3128 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
|
3129 setl cino=/6 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3130 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3131 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3132 void f() |
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 statement; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3135 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3136 // comment 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3137 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3138 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3139 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3140 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3141 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3142 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3143 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3144 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3145 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3146 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3147 statement; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3148 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3149 // comment 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3150 } |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3153 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3154 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
|
3155 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3156 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3157 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3158 func Test_cindent_27() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3159 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3160 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
|
3161 setl cino= |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3162 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3163 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3164 void f() |
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 statement; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3167 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3168 // comment 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3169 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3170 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3171 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3172 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3173 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3174 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
|
3175 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3176 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3177 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3178 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3179 statement; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3180 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3181 // comment 2 |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3184 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3185 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3186 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
|
3187 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3188 endfunc |
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 func Test_cindent_28() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3191 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3192 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
|
3193 setl cino=g0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3194 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3195 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3196 class CAbc |
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 int Test() { return FALSE; } |
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 public: // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3201 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3202 protected: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3203 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3204 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3205 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3206 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3207 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3208 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3209 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3210 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3211 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3212 class CAbc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3213 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3214 int Test() { return FALSE; } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3215 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3216 public: // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3217 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3218 protected: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3219 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3220 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3221 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3222 [CODE] |
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 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
|
3225 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3226 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3227 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3228 func Test_cindent_29() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3229 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3230 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
|
3231 setl cino=(0,gs,hs |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3234 class Foo : public Bar |
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 public: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3237 virtual void method1(void) = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3238 virtual void method2(int arg1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3239 int arg2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3240 int arg3) = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3241 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3242 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3243 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3244 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3245 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3246 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3247 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3248 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3249 class Foo : public Bar |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3250 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3251 public: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3252 virtual void method1(void) = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3253 virtual void method2(int arg1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3254 int arg2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3255 int arg3) = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3256 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3257 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3258 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3259 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3260 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
|
3261 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3262 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3263 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3264 func Test_cindent_30() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3265 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3266 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
|
3267 setl cino=+20 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3268 |
17172
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3269 let code =<< [CODE] |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3270 void |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3271 foo() |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3272 { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3273 if (a) |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3274 { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3275 } else |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3276 asdf; |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3277 } |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3278 [CODE] |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3279 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3280 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3281 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3282 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3283 |
17172
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3284 let expected =<< [CODE] |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3285 void |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3286 foo() |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3287 { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3288 if (a) |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3289 { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3290 } else |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3291 asdf; |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3292 } |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3293 |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3294 [CODE] |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3295 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3296 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
|
3297 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3298 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3299 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3300 func Test_cindent_31() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3301 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3302 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
|
3303 setl cino=(0,W2s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3304 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3305 let code =<< trim [CODE] |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3308 averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3309 asdasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3310 func(asdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3311 asdfadsf), |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3315 /* those are ugly, but consequent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3316 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3317 func()->asd(asdasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3318 averylongfunctionname( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3319 abc, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3320 dec)->averylongfunctionname( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3321 asdfadsf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3322 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3323 asdfasdf, |
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 func(asdfadf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3326 asdfasdf |
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 asdasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3329 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3330 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3331 averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3332 abc, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3333 dec)->asdfasdfasdf( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3334 asdfadsf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3335 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3336 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3337 ), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3338 func(asdfadf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3339 asdfasdf), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3340 asdasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3341 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3342 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3343 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3346 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3347 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3348 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3349 let expected =<< trim [CODE] |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3352 averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3353 asdasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3354 func(asdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3355 asdfadsf), |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3359 /* those are ugly, but consequent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3360 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3361 func()->asd(asdasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3362 averylongfunctionname( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3363 abc, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3364 dec)->averylongfunctionname( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3365 asdfadsf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3366 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3367 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3368 ), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3369 func(asdfadf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3370 asdfasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3371 ), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3372 asdasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3373 ); |
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 averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3376 abc, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3377 dec)->asdfasdfasdf( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3378 asdfadsf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3379 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3380 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3381 ), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3382 func(asdfadf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3383 asdfasdf), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3384 asdasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3385 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3386 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3387 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3388 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3389 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3390 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
|
3391 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3392 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3393 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3394 func Test_cindent_32() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3395 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3396 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
|
3397 setl cino=M1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3398 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3399 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3400 int main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3401 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3402 if (cond1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3403 cond2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3404 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3405 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3406 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3407 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3410 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3411 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3412 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3413 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3414 int main () |
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 if (cond1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3417 cond2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3418 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3419 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3420 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3421 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3422 [CODE] |
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 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
|
3425 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3426 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3427 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3428 func Test_cindent_33() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3429 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3430 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
|
3431 setl cino=(0,ts |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3434 void func(int a |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3435 #if defined(FOO) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3436 , int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3437 , int c |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3438 #endif |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3441 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3442 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3443 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3444 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3445 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3446 normal 2j=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3447 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3448 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3449 void func(int a |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3450 #if defined(FOO) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3451 , int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3452 , int c |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3453 #endif |
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 } |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3459 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3460 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
|
3461 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3462 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3463 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3464 func Test_cindent_34() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3465 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3466 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
|
3467 setl cino=(0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3468 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3469 let code =<< trim [CODE] |
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 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3472 func(int a |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3473 #if defined(FOO) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3474 , int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3475 , int c |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3476 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3477 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3478 { |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3481 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3482 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3483 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3484 normal =][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3485 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3486 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
|
3487 |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3488 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3489 func(int a |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3490 #if defined(FOO) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3491 , int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3492 , int c |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3493 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3494 ) |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3498 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3499 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3500 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
|
3501 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3502 endfunc |
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 func Test_cindent_35() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3505 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3506 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
|
3507 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3508 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3509 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3510 void func(void) |
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 if(x==y) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3513 if(y==z) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3514 foo=1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3515 else { bar=1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3516 baz=2; |
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 printf("Foo!\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3519 } |
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 void func1(void) |
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 char* tab[] = {"foo", "bar", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3524 "baz", "quux", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3525 "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
|
3526 foo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3527 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3528 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3529 void func2(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3530 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3531 int tab[] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3532 {1, 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3533 3, 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3534 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3535 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3536 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
|
3537 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3538 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3539 int foo[] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3540 #ifdef BAR |
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 = { 1, 2, 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3543 4, 5, 6 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3544 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3545 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3546 ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3547 int baz; |
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 void func3(void) |
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 int tab[] = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3552 1, 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3553 3, 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3554 5, 6}; |
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 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
|
3557 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3558 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3559 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3560 func4(a, b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3561 c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3562 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3563 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3564 int c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3565 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3566 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3567 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3568 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3569 func5( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3570 int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3571 int b) |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3575 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3576 func6( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3577 int a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3578 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3579 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3580 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3583 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3584 normal ]]=7][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3585 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3586 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3587 void func(void) |
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 if(x==y) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3590 if(y==z) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3591 foo=1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3592 else { bar=1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3593 baz=2; |
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 printf("Foo!\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3596 } |
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 void func1(void) |
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 char* tab[] = {"foo", "bar", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3601 "baz", "quux", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3602 "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
|
3603 foo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3604 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3605 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3606 void func2(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3607 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3608 int tab[] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3609 {1, 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3610 3, 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3611 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3612 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3613 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
|
3614 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3615 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3616 int foo[] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3617 #ifdef BAR |
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 = { 1, 2, 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3620 4, 5, 6 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3621 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3622 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3623 ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3624 int baz; |
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 void func3(void) |
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 int tab[] = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3629 1, 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3630 3, 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3631 5, 6}; |
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 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
|
3634 } |
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 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3637 func4(a, b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3638 c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3639 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3640 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3641 int c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3642 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3643 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3644 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3645 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3646 func5( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3647 int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3648 int b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3649 { |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3652 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3653 func6( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3654 int a) |
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 } |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3659 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3660 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
|
3661 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3662 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3663 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3664 func Test_cindent_36() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3665 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3666 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
|
3667 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3668 setl cino+=l1 |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3671 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3672 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3673 int tab[] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3674 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3675 1, 2, 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3676 4, 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3677 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3678 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
|
3679 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3680 switch (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3681 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3682 case bar: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3683 printf("bar"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3684 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3685 case baz: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3686 printf("baz"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3687 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3688 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3689 case quux: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3690 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
|
3691 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3692 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3693 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3694 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3695 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3696 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3697 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3698 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3701 void func(void) |
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 int tab[] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3704 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3705 1, 2, 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3706 4, 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3707 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3708 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
|
3709 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3710 switch (foo) |
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 case bar: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3713 printf("bar"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3714 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3715 case baz: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3716 printf("baz"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3717 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3718 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3719 case quux: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3720 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
|
3721 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3722 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3723 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3724 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3725 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3726 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3727 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
|
3728 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3729 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3730 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3731 func Test_cindent_37() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3732 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3733 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
|
3734 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3735 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3736 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3737 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3738 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3739 cout << "a" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3740 << "b" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3741 << ") :" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3742 << "c"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3743 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3744 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3747 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3748 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3751 void func(void) |
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 cout << "a" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3754 << "b" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3755 << ") :" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3756 << "c"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3757 } |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3760 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3761 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
|
3762 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3763 endfunc |
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 func Test_cindent_38() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3766 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3767 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
|
3768 setl com=s1:/*,m:*,ex:*/ |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3771 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3772 { |
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 * This is a comment. |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3775 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3776 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3777 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3780 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3781 normal ]]3jofoo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3782 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3783 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3784 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3785 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3786 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3787 * This is a comment. |
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 foo(); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3792 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3793 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3794 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
|
3795 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3796 endfunc |
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 func Test_cindent_39() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3799 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3800 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
|
3801 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3802 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3803 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3804 void func(void) |
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 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
|
3807 if (i & 1) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3808 foo(1); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3809 } else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3810 foo(0); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3811 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3812 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3813 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3814 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3815 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3816 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3817 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3818 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3819 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3820 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3821 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3822 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
|
3823 if (i & 1) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3824 foo(1); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3825 } else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3826 foo(0); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3827 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3828 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3829 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3830 [CODE] |
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 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
|
3833 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3834 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3835 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3836 func Test_cindent_40() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3837 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3838 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
|
3839 setl cino=k2s,(0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3840 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3841 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3842 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3843 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3844 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3845 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3846 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3847 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3848 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3849 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3850 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3851 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3852 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3853 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3854 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3855 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3856 } |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3859 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3860 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3861 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3862 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3863 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3864 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3865 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3866 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3867 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3868 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3869 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3870 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3871 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3872 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3873 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3874 void func(void) |
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 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3877 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3878 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3879 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3880 && argument2); |
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 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3883 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3884 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3885 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3886 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3887 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3888 } |
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 ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3891 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3892 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3893 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3894 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3895 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3896 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3897 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3898 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3899 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3900 [CODE] |
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 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
|
3903 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3904 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3905 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3906 func Test_cindent_41() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3907 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3908 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
|
3909 setl cino=k2s,(s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3910 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3911 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3912 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3913 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3914 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3915 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3916 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3917 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3918 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3919 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3920 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3921 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3922 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3923 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3924 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3925 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3926 } |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3929 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3930 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3931 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3932 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3933 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3934 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3935 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3936 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3937 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3938 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3939 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3940 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3941 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3942 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3943 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3944 void func(void) |
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 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3947 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3948 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3949 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3950 && argument2); |
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 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3953 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3954 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3955 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3956 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3957 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3958 } |
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 ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3961 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3962 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3963 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3964 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3965 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3966 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3967 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3968 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3969 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3970 [CODE] |
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 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
|
3973 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3974 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3975 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3976 func Test_cindent_42() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3977 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3978 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
|
3979 setl cino=k2s,(s,U1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3980 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3981 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3982 void func(void) |
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 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3985 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3986 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3987 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3988 && argument2); |
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 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3991 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3992 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3993 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3994 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3995 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3996 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3997 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3998 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3999 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4000 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4001 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4002 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4003 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4004 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4005 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4006 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4007 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4008 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4009 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4010 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4011 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4012 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4013 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4014 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4015 void func(void) |
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 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4018 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4019 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4020 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4021 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4022 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4023 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4024 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4025 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4026 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4027 (c2 || c3)) |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4030 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4031 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4032 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4033 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4034 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4035 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4036 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4037 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4038 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4039 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4040 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4041 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4042 [CODE] |
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 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
|
4045 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4046 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4047 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4048 func Test_cindent_43() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4049 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4050 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
|
4051 setl cino=k2s,(0,W4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4052 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4053 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4054 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4055 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4056 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4057 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4058 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4059 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4060 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4061 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4062 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4063 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4064 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4065 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4066 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4067 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4068 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4069 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4070 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4071 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4072 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4073 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4074 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4075 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4076 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4077 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4078 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4079 a_long_line( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4080 argument, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4081 argument); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4082 a_short_line(argument, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4083 argument); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4084 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4085 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4086 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4087 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4088 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4089 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4090 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4091 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4092 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4093 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4094 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4095 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4096 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4097 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4098 && argument2); |
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 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4101 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4102 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4103 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4104 (c2 || c3)) |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4107 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4108 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4109 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4110 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4111 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4112 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4113 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4114 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4115 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4116 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4117 a_long_line( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4118 argument, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4119 argument); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4120 a_short_line(argument, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4121 argument); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4122 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4123 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4124 [CODE] |
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 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
|
4127 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4128 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4129 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4130 func Test_cindent_44() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4131 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4132 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
|
4133 setl cino=k2s,u2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4134 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4135 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4136 void func(void) |
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 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4139 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4140 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4141 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4142 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4143 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4144 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4145 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4146 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4147 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4148 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4149 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4150 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4151 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4152 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4153 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4154 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4155 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4156 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4157 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4158 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4159 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4160 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4163 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4164 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4165 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4166 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4167 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4168 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4169 && argument2); |
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 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4172 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4173 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4174 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4175 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4176 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4177 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4178 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4179 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4180 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4181 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4182 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4183 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4184 [CODE] |
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 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
|
4187 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4188 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4189 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4190 func Test_cindent_45() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4191 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4192 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
|
4193 setl cino=k2s,(0,w1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4194 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4195 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4196 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4197 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4198 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4199 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4200 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4201 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4202 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4203 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4204 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4205 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4206 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4207 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4208 (c2 || c3)) |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4211 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4212 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4213 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4214 printf("foo\n"); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4217 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4218 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4219 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4220 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4221 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4222 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4223 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4224 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4225 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4226 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4227 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4228 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4229 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4230 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4231 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4232 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4233 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4234 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4235 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4236 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4237 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4238 && argument2); |
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 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4241 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4242 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4243 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4244 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4245 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4246 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4247 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4248 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4249 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4250 printf("foo\n"); |
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 ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4253 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4254 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4255 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4256 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4257 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4258 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4259 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4260 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4261 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4262 [CODE] |
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 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
|
4265 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4266 endfunc |
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 func Test_cindent_46() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4269 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4270 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
|
4271 setl cino=k2,(s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4272 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4273 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4274 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4275 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4276 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4277 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4278 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4279 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4280 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4281 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4282 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4283 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4284 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4285 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4286 (c2 || c3)) |
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 append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4293 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4294 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4297 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4298 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4299 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4300 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4301 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4302 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4303 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4304 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4305 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4306 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4307 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4308 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4309 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4310 { |
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 } |
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 [CODE] |
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 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
|
4317 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4318 endfunc |
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 func Test_cindent_47() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4321 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4322 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
|
4323 setl cino=N-s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4324 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4325 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4326 NAMESPACESTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4327 /* valid namespaces with normal indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4328 namespace |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4331 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4332 } |
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 */ |
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 11111111111111111; |
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 |
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 |
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 test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4347 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4348 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4349 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4350 namespace test::cpp17 |
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 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4353 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4354 namespace ::incorrectcpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4355 { |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4358 namespace test::incorrectcpp17:: |
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 111111111111111111; |
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 namespace test:incorrectcpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4363 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4364 111111111111111111; |
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 namespace test:::incorrectcpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4367 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4368 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4369 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4370 namespace{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4371 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4372 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4373 namespace test{ |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4377 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4378 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4379 namespace test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4380 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4381 namespace test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4382 22222222222222222; |
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 } |
26694
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4385 inline namespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4386 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4387 } |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4388 inline /* test */ namespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4389 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4390 } |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4391 inline/* test */namespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4392 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4393 } |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4394 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4395 /* invalid namespaces use block indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4396 namespace test test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4397 111111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4398 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4399 namespace11111111111 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4400 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4401 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4402 namespace() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4403 1111111111111; |
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() |
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 test test2 |
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 1111111111111111111; |
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 namespace111111111 |
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 } |
26694
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4417 inlinenamespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4418 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4419 } |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4420 NAMESPACEEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4421 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4424 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4425 call search('^NAMESPACESTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4426 exe "normal =/^NAMESPACEEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4427 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4428 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4429 NAMESPACESTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4430 /* valid namespaces with normal indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4431 namespace |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4434 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4435 } |
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 /* test */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4438 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4439 11111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4440 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4441 namespace // test |
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 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4444 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4445 namespace |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4446 { |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4449 namespace test |
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 111111111111111111; |
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 namespace test::cpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4454 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4455 111111111111111111; |
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 namespace ::incorrectcpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4458 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4459 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4460 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4461 namespace test::incorrectcpp17:: |
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 111111111111111111; |
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 namespace test:incorrectcpp17 |
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 111111111111111111; |
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 namespace test:::incorrectcpp17 |
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 111111111111111111; |
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 namespace{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4474 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4475 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4476 namespace test{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4477 111111111111111111; |
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 namespace { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4480 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4481 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4482 namespace test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4483 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4484 namespace test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4485 22222222222222222; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4486 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4487 } |
26694
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4488 inline namespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4489 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4490 } |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4491 inline /* test */ namespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4492 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4493 } |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4494 inline/* test */namespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4495 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4496 } |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4497 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4498 /* invalid namespaces use block indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4499 namespace test test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4500 111111111111111111111; |
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 namespace11111111111 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4503 111111111111; |
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 namespace() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4506 1111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4507 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4508 namespace() |
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 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4511 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4512 namespace test test2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4513 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4514 1111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4515 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4516 namespace111111111 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4517 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4518 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4519 } |
26694
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4520 inlinenamespace { |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4521 111111111111111111; |
1095fd0dc362
patch 8.2.3876: 'cindent' does not recognize inline namespace
Bram Moolenaar <Bram@vim.org>
parents:
26516
diff
changeset
|
4522 } |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4523 NAMESPACEEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4524 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4525 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4526 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4527 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
|
4528 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4529 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4530 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4531 func Test_cindent_48() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4532 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4533 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
|
4534 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4535 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4536 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4537 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4538 var bar = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4539 foo: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4540 that: this, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4541 some: ok, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4542 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4543 "bar":{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4544 a : 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4545 b: "123abc", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4546 x: 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4547 "y": 5 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4548 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4549 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4550 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4551 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4552 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4553 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4554 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4555 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4556 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4557 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4558 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4559 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4560 var bar = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4561 foo: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4562 that: this, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4563 some: ok, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4564 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4565 "bar":{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4566 a : 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4567 b: "123abc", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4568 x: 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4569 "y": 5 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4570 } |
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 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4573 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4574 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4575 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4576 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
|
4577 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4578 endfunc |
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 func Test_cindent_49() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4581 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4582 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
|
4583 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4584 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4585 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4586 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4587 var foo = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4588 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4589 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4590 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4591 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4592 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4593 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4594 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4595 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4596 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4597 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4598 exe "normal =/^JSEND\n" |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4601 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4602 var foo = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4603 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4604 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4605 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4606 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4607 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4608 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4609 [CODE] |
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 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
|
4612 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4613 endfunc |
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 func Test_cindent_50() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4616 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4617 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
|
4618 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4619 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4620 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4621 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4622 function bar() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4623 var foo = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4624 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4625 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4626 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4627 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4628 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4629 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4630 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4633 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4634 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4635 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4636 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4637 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4638 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4639 function bar() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4640 var foo = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4641 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4642 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4643 3 |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4646 JSEND |
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 [CODE] |
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 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
|
4651 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4652 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4653 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4654 func Test_cindent_51() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4655 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4656 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
|
4657 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4658 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4659 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4660 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4661 (function($){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4662 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4663 if (cond && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4664 cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4665 stmt; |
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 window.something.left = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4668 (width - 50 + offset) + "px"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4669 var class_name='myclass'; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4670 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4671 function private_method() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4672 } |
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 var public_method={ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4675 method: function(options,args){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4676 private_method(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4677 } |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4680 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4681 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4682 $(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
|
4683 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4684 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4685 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4686 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4687 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4688 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4689 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4690 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4691 return true; |
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 }, options||{})); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4694 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4695 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4696 $.fn[class_name]=function() { |
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 var _arguments=arguments; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4699 return this.each(function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4700 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4701 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
|
4702 if (!options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4703 init.apply(this,_arguments); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4704 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4705 } else { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4706 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
|
4707 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4708 if (typeof(method)!='function') { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4709 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
|
4710 return false; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4711 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4712 _arguments[0]=options; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4713 method.apply(this,_arguments); |
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 } |
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 })(jQuery); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4719 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4720 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4721 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4722 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4723 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4724 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4725 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4726 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4727 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4728 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4729 (function($){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4730 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4731 if (cond && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4732 cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4733 stmt; |
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 window.something.left = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4736 (width - 50 + offset) + "px"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4737 var class_name='myclass'; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4738 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4739 function private_method() { |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4742 var public_method={ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4743 method: function(options,args){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4744 private_method(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4745 } |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4748 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4749 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4750 $(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
|
4751 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4752 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4753 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4754 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4755 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4756 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4757 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4758 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4759 return true; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4760 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4761 }, options||{})); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4764 $.fn[class_name]=function() { |
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 var _arguments=arguments; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4767 return this.each(function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4768 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4769 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
|
4770 if (!options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4771 init.apply(this,_arguments); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4772 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4773 } else { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4774 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
|
4775 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4776 if (typeof(method)!='function') { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4777 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
|
4778 return false; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4779 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4780 _arguments[0]=options; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4781 method.apply(this,_arguments); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4782 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4783 }); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4784 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4785 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4786 })(jQuery); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4787 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4788 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4789 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4790 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4791 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
|
4792 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4793 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4794 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4795 func Test_cindent_52() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4796 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4797 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
|
4798 setl cino=j1,J1 |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4801 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4802 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4803 $(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
|
4804 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4805 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4806 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4807 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4808 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4809 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4810 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4811 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4812 return true; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4813 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4814 }, options||{})); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4815 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4816 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4817 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4818 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4819 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4820 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4821 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4822 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4823 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4824 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4825 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4826 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4827 $(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
|
4828 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4829 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4830 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4831 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4832 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4833 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4834 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4835 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4836 return true; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4837 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4838 }, options||{})); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4839 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4840 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4841 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4842 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4843 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4844 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
|
4845 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4846 endfunc |
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 func Test_cindent_53() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4849 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4850 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
|
4851 setl cino=j1,J1 |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4854 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4855 (function($){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4856 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4857 $(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
|
4858 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4859 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4860 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4861 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4862 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4863 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4864 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4865 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4866 return true; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4867 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4868 }, options||{})); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4869 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4870 })(jQuery); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4871 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4872 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4873 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4874 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4875 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4876 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4877 exe "normal =/^JSEND\n" |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4880 JSSTART |
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 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4883 $(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
|
4884 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4885 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4886 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4887 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4888 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4889 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4890 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4891 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4892 return true; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4893 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4894 }, options||{})); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4895 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4896 })(jQuery); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4897 JSEND |
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 [CODE] |
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 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
|
4902 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4903 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4904 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4905 func Test_cindent_54() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4906 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4907 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
|
4908 setl cino=j1,J1,+2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4909 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4910 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4911 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4912 // Results of JavaScript indent |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4913 // 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4914 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4915 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4916 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4917 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4918 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4919 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4920 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4921 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4922 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4923 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4924 'i' |
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 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4927 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4928 // 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4929 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4930 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4931 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4932 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4933 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4934 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4935 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4936 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4937 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4938 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4939 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4940 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4941 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4942 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4943 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4944 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4945 'i' |
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 }()) |
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 // 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4950 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4951 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4952 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4953 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4954 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4955 /* comment 2 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4956 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4957 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4958 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4959 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4960 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4961 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4962 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4963 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4964 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4965 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4966 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4967 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4968 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4969 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4970 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4971 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4972 // 4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4973 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4974 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4975 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4976 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4977 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4978 var b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4979 var c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4980 } |
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 // 5 |
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 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4985 [ |
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 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4988 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4989 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4990 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4991 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4992 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4993 // 6 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4994 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4995 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4996 [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4997 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4998 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4999 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5000 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5001 3 |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5004 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5005 // 7 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5006 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5007 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5008 // [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5009 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5010 // 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5011 // ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5012 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5013 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5014 ]; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5017 // 8 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5018 var x = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5019 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5020 var a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5021 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5022 c, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5023 d, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5024 e, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5025 f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5026 g, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5027 h, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5028 i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5029 }) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5030 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5031 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5032 // 9 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5033 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5034 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5035 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5036 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5037 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5038 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5039 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5040 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5041 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5042 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5043 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5044 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5045 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5046 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5047 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5048 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5049 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5050 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5051 // 10 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5052 var a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5053 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5054 c, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5055 d, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5056 e, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5057 f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5058 g, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5059 h, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5060 i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5061 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5062 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5063 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5064 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5065 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5066 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5067 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5068 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5069 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5070 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5071 // Results of JavaScript indent |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5072 // 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5073 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5074 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5075 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5076 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5077 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5078 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5079 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5080 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5081 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5082 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5083 'i' |
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 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5086 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5087 // 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5088 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5089 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5090 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5091 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5092 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5093 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5094 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5095 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5096 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5097 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5098 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5099 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5100 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5101 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5102 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5103 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5104 'i' |
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 }()) |
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 // 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5109 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5110 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5111 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5112 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5113 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5114 /* comment 2 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5115 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5116 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5117 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5118 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5119 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5120 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5121 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5122 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5123 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5124 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5125 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5126 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5127 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5128 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5129 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5130 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5131 // 4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5132 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5133 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5134 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5135 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5136 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5137 var b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5138 var c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5139 } |
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 // 5 |
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 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5144 [ |
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 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5147 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5148 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5149 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5150 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5151 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5152 // 6 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5153 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5154 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5155 [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5156 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5157 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5158 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5159 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5160 3 |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5163 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5164 // 7 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5165 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5166 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5167 // [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5168 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5169 // 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5170 // ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5171 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5172 3 |
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 } |
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 // 8 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5177 var x = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5178 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5179 var a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5180 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5181 c, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5182 d, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5183 e, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5184 f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5185 g, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5186 h, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5187 i; |
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 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5190 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5191 // 9 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5192 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5193 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5194 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5195 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5196 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5197 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5198 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5199 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5200 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5201 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5202 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5203 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5204 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5205 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5206 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5207 'i' |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5210 // 10 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5211 var a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5212 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5213 c, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5214 d, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5215 e, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5216 f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5217 g, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5218 h, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5219 i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5220 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5221 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5222 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5223 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5224 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
|
5225 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5226 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5227 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5228 func Test_cindent_55() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5229 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5230 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
|
5231 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5232 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5233 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5234 /* start of define */ |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5237 #define AAA \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5238 BBB\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5239 CCC |
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 #define CNT \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5242 1 + \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5243 2 + \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5244 4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5245 /* end of define */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5246 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5247 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5248 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5249 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5250 call search('start of define') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5251 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
|
5252 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5253 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5254 /* start of define */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5255 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5256 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5257 #define AAA \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5258 BBB\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5259 CCC |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5260 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5261 #define CNT \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5262 1 + \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5263 2 + \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5264 4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5265 /* end of define */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5266 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5267 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5268 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5269 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
|
5270 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5271 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5272 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5273 func Test_cindent_56() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5274 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5275 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
|
5276 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5277 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5278 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5279 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5280 a = second/*bug*/*line; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5281 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5282 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5283 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5284 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5285 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5286 call search('a = second') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5287 normal ox |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5288 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5289 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5290 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5291 a = second/*bug*/*line; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5292 x |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5293 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5294 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5295 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5296 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5297 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
|
5298 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5299 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5300 |
19104
9f4648953f1a
patch 8.2.0112: illegal memory access when using 'cindent'
Bram Moolenaar <Bram@vim.org>
parents:
17918
diff
changeset
|
5301 " 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
|
5302 func Test_cindent_case() |
9f4648953f1a
patch 8.2.0112: illegal memory access when using 'cindent'
Bram Moolenaar <Bram@vim.org>
parents:
17918
diff
changeset
|
5303 new |
19195
2ef19eed524a
patch 8.2.0156: various typos in source files and tests
Bram Moolenaar <Bram@vim.org>
parents:
19104
diff
changeset
|
5304 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
|
5305 set cindent |
9f4648953f1a
patch 8.2.0112: illegal memory access when using 'cindent'
Bram Moolenaar <Bram@vim.org>
parents:
17918
diff
changeset
|
5306 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
|
5307 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
|
5308 set cindent& |
19104
9f4648953f1a
patch 8.2.0112: illegal memory access when using 'cindent'
Bram Moolenaar <Bram@vim.org>
parents:
17918
diff
changeset
|
5309 bwipe! |
9f4648953f1a
patch 8.2.0112: illegal memory access when using 'cindent'
Bram Moolenaar <Bram@vim.org>
parents:
17918
diff
changeset
|
5310 endfunc |
9f4648953f1a
patch 8.2.0112: illegal memory access when using 'cindent'
Bram Moolenaar <Bram@vim.org>
parents:
17918
diff
changeset
|
5311 |
19613
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5312 " 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
|
5313 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
|
5314 new |
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5315 setlocal cindent |
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5316 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
|
5317 normal! jc3jm = 2; |
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5318 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
|
5319 close! |
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5320 endfunc |
9c15be376631
patch 8.2.0363: some Normal mode commands not tested
Bram Moolenaar <Bram@vim.org>
parents:
19195
diff
changeset
|
5321 |
20621
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5322 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
|
5323 new |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5324 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
|
5325 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
|
5326 |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5327 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
|
5328 { |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5329 #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
|
5330 { |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5331 #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
|
5332 foo(); |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5333 # 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
|
5334 } |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5335 } |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5336 [CODE] |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5337 |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5338 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
|
5339 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
|
5340 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
|
5341 |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5342 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
|
5343 { |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5344 #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
|
5345 { |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5346 #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
|
5347 foo(); |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5348 # 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
|
5349 } |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5350 } |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5351 |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5352 [CODE] |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5353 |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5354 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
|
5355 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
|
5356 endfunc |
d30b16692ce0
patch 8.2.0864: pragmas are indented all the way to the left
Bram Moolenaar <Bram@vim.org>
parents:
19613
diff
changeset
|
5357 |
25897
f2fb5d30cd16
patch 8.2.3482: reading beyond end of line ending in quote and backslash
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
5358 func Test_backslash_at_end_of_line() |
f2fb5d30cd16
patch 8.2.3482: reading beyond end of line ending in quote and backslash
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
5359 new |
f2fb5d30cd16
patch 8.2.3482: reading beyond end of line ending in quote and backslash
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
5360 exe "norm v>O'\\\<C-m>-" |
f2fb5d30cd16
patch 8.2.3482: reading beyond end of line ending in quote and backslash
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
5361 exe "norm \<C-q>=" |
f2fb5d30cd16
patch 8.2.3482: reading beyond end of line ending in quote and backslash
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
5362 bwipe! |
f2fb5d30cd16
patch 8.2.3482: reading beyond end of line ending in quote and backslash
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
5363 endfunc |
f2fb5d30cd16
patch 8.2.3482: reading beyond end of line ending in quote and backslash
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
5364 |
26187
8e92f01f7226
patch 8.2.3625: illegal memory access when C-indenting
Bram Moolenaar <Bram@vim.org>
parents:
25897
diff
changeset
|
5365 func Test_find_brace_backwards() |
8e92f01f7226
patch 8.2.3625: illegal memory access when C-indenting
Bram Moolenaar <Bram@vim.org>
parents:
25897
diff
changeset
|
5366 " this was looking beyond the end of the line |
8e92f01f7226
patch 8.2.3625: illegal memory access when C-indenting
Bram Moolenaar <Bram@vim.org>
parents:
25897
diff
changeset
|
5367 new |
8e92f01f7226
patch 8.2.3625: illegal memory access when C-indenting
Bram Moolenaar <Bram@vim.org>
parents:
25897
diff
changeset
|
5368 norm R/* |
8e92f01f7226
patch 8.2.3625: illegal memory access when C-indenting
Bram Moolenaar <Bram@vim.org>
parents:
25897
diff
changeset
|
5369 norm o0{ |
8e92f01f7226
patch 8.2.3625: illegal memory access when C-indenting
Bram Moolenaar <Bram@vim.org>
parents:
25897
diff
changeset
|
5370 norm o// |
8e92f01f7226
patch 8.2.3625: illegal memory access when C-indenting
Bram Moolenaar <Bram@vim.org>
parents:
25897
diff
changeset
|
5371 norm V{= |
8e92f01f7226
patch 8.2.3625: illegal memory access when C-indenting
Bram Moolenaar <Bram@vim.org>
parents:
25897
diff
changeset
|
5372 call assert_equal(['/*', ' 0{', '//'], getline(1, 3)) |
8e92f01f7226
patch 8.2.3625: illegal memory access when C-indenting
Bram Moolenaar <Bram@vim.org>
parents:
25897
diff
changeset
|
5373 bwipe! |
8e92f01f7226
patch 8.2.3625: illegal memory access when C-indenting
Bram Moolenaar <Bram@vim.org>
parents:
25897
diff
changeset
|
5374 endfunc |
8e92f01f7226
patch 8.2.3625: illegal memory access when C-indenting
Bram Moolenaar <Bram@vim.org>
parents:
25897
diff
changeset
|
5375 |
8e92f01f7226
patch 8.2.3625: illegal memory access when C-indenting
Bram Moolenaar <Bram@vim.org>
parents:
25897
diff
changeset
|
5376 |
11087
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
5377 " vim: shiftwidth=2 sts=2 expandtab |