Mercurial > vim
annotate src/testdir/test_cindent.vim @ 17314:b60402471f69 v8.1.1656
patch 8.1.1656: popup window width is wrong when using Tabs
commit https://github.com/vim/vim/commit/e089c3fd6937524a14d22baa7562b0820f1343ac
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jul 9 20:25:25 2019 +0200
patch 8.1.1656: popup window width is wrong when using Tabs
Problem: Popup window width is wrong when using Tabs. (Paul Jolly)
Solution: Count tabs correctly. (closes https://github.com/vim/vim/issues/4637)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 09 Jul 2019 20:30:04 +0200 |
parents | 6990c1160ea5 |
children | f71ee7b04f0b |
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 |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 func Test_cino_hash() |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 " 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
|
6 new |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 setlocal cindent cinoptions=#1 |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 setlocal cinoptions= |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 call setline(1, ["#include <iostream>"]) |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 call cursor(1, 1) |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 norm! o#include |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 "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
|
13 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
|
14 bwipe! |
814126a34c9d
patch 8.0.0423: changing 'cinoptions' does not always work
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 endfunc |
11087
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
16 |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
17 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
|
18 " 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
|
19 |
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
|
20 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
|
21 #ifdef __cplusplus |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
22 extern "C" { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
23 #endif |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
24 int func_a(void); |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
25 #ifdef __cplusplus |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
26 } |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
27 #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
|
28 [CODE] |
11087
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
29 |
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
|
30 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
|
31 #ifdef __cplusplus |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
32 extern "C" { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
33 #endif |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
34 int func_a(void); |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
35 #ifdef __cplusplus |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
36 } |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
37 #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
|
38 [CODE] |
11087
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
39 new |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
40 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
|
41 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
|
42 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
|
43 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
|
44 |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
45 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
|
46 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
|
47 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
|
48 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
|
49 |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
50 setlocal cinoptions=Es |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
51 let tests = [ |
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 "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 /* 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
|
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 \ ['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
|
57 \ ['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
|
58 \ ['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
|
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 \ ['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
|
61 \ ] |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
62 |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
63 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
|
64 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
|
65 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
|
66 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
|
67 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
|
68 endfor |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
69 |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
70 bwipe! |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
71 endfunc |
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
72 |
12323
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
73 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
|
74 new |
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
75 setl cindent |
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
76 call feedkeys("i" . |
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
77 \ "int main() {\<CR>" . |
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
78 \ "R\"(\<CR>" . |
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
79 \ ")\";\<CR>" . |
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
80 \ "statement;\<Esc>", "x") |
0066a7e178bc
patch 8.0.0999: indenting raw C++ strings is wrong
Christian Brabandt <cb@256bit.org>
parents:
11087
diff
changeset
|
81 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
|
82 bw! |
12323
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
83 endfunc |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
84 |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
85 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
|
86 new |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
87 func! MyIndentFunction() |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
88 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
|
89 endfunc |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
90 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
|
91 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
|
92 var_a = something() |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
93 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
|
94 [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
|
95 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
|
96 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
|
97 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
|
98 let expected =<< [CODE] |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
99 var_a = something(); |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
100 b = something(); |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
101 [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
|
102 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
|
103 |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
104 %d |
17172
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
105 let testinput =<< [CODE] |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
106 var_a = something() |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
107 b = something() |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
108 [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
|
109 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
|
110 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
|
111 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
|
112 let expected =<< [CODE] |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
113 var_a = something(); |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
114 b = something() |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
115 [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
|
116 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
|
117 bw! |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
118 endfunc |
4dba3e4f3b01
patch 8.0.1041: bogus characters when indenting during visual-block append
Christian Brabandt <cb@256bit.org>
parents:
12238
diff
changeset
|
119 |
16668
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
120 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
|
121 new |
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
122 setlocal cindent |
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
123 call setline(1, ['int main(void)', '{', 'return 0;', '}']) |
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
124 call assert_equal(cindent(0), -1) |
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
125 call assert_equal(cindent(3), &sw) |
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
126 call assert_equal(cindent(line('$')+1), -1) |
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
127 bwipe! |
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
128 endfunc |
81be817c9d9a
patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
12323
diff
changeset
|
129 |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
130 func Test_cindent_1() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
131 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
132 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
|
133 setl cino& sts& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
134 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
135 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
136 /* 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
|
137 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
138 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
139 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
140 cmd2; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
144 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
145 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
146 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
147 cmd2; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
151 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
152 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
153 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
154 cmd2; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
159 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
160 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
161 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
162 else |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
167 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
168 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
169 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
170 cmd2; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
174 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
175 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
176 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
177 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
178 cmd2; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
182 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
183 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
184 cmd; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
187 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
188 cmd; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
192 if (test) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
193 cmd; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
196 if (test) cmd; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
200 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
201 for (blah) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
202 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
203 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
204 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
205 cmd3; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
209 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
210 for (blah) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
211 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
212 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
213 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
214 cmd3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
215 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
216 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
217 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
218 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
219 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
220 cmd3; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
225 /* 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
|
226 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
227 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
228 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
229 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
230 asdfasd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
231 while (cond); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
232 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
233 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
234 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
235 while (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
236 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
237 while (asdf); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
240 /* 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
|
241 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
242 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
|
243 aal;sdkjf ( ;asldfkja;sldfk |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
244 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
|
245 line up here; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
249 /* C++ tests: */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
250 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
251 // 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
|
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
255 /* 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
|
256 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
257 i = 99 + 14325 + |
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 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
260 21345 + ( 21345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
261 21345) + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
262 2345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
263 1234; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
264 c = 1; |
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 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
268 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
|
269 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
270 here */ |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
273 if (testing && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
274 not a joke || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
275 line up here) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
276 hay; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
277 if (testing && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
278 (not a joke || testing |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
279 )line up here) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
280 hay; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
281 if (testing && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
282 (not a joke || testing |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
283 line up here)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
284 hay; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
289 switch (c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
290 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
291 case xx: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
292 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
293 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
294 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
295 asdfasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
296 while (asdf); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
297 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
298 asdfasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
299 while (cond); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
300 case yy: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
301 case xx: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
302 case zz: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
303 testing; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
308 if (cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
309 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
310 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
311 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
312 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
313 bar; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
318 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
|
319 alsdkfj (asldk;fj |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
320 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
|
321 ;laksjfd ;lsakdjf ;alskdf asd) |
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 asdfasdf; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
326 int |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
327 func(a, b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
328 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
329 int c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
330 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
331 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
332 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
333 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
334 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
335 (c2 || c3) |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
340 while (asd) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
341 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
342 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
343 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
344 if (that) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
345 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
346 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
347 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
348 cdasd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
349 while (as |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
350 df); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
351 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
352 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
353 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
354 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
355 else |
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 asdf; |
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 { |
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 s = "/*"; b = ';'; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
364 a = b; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
368 switch (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
369 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
370 case a: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
371 switch (t) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
372 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
373 case 1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
374 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
375 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
376 case 2: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
377 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
378 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
379 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
380 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
381 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
382 case b: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
383 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
384 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
385 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
386 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
387 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
388 case c: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
389 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
390 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
391 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
392 case d: if (cond && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
393 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
|
394 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
395 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
396 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
397 break; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
402 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
|
403 (bp_to->b_p_initialized || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
404 (!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
|
405 return; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
406 label : |
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 asdf: asdf; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
413 /* 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
|
414 /* : 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
|
415 /* : 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
|
416 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
417 char *(array[100]) = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
418 "testje", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
419 "foo", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
420 "bar", |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
423 enum soppie |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
424 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
425 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
426 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
427 maybe |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
430 typedef enum soppie |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
431 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
432 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
433 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
434 maybe |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
437 static enum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
438 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
439 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
440 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
441 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
442 } soppie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
443 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
444 public static enum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
445 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
446 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
447 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
448 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
449 } soppie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
450 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
451 static private enum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
452 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
453 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
454 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
455 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
456 } soppie; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
459 int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
460 b; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
464 struct Type |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
465 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
466 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
467 char *str; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
468 } var[] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
469 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
470 0, "zero", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
471 1, "one", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
472 2, "two", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
473 3, "three" |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
476 float matrix[3][3] = |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
479 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
480 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
481 2 |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
484 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
485 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
486 5 |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
489 6, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
490 7, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
491 8 |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
497 /* blah ( blah */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
498 /* where does this go? */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
499 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
500 /* blah ( blah */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
501 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
502 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
503 func(arg1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
504 /* comment */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
505 arg2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
506 a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
507 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
508 b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
509 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
510 c; /* Hey, NOW it indents?! */ |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
515 func(arg1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
516 arg2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
517 arg3); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
518 /* 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
|
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
522 main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
523 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
524 if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
525 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
526 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
527 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
528 if (cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
529 a = c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
530 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
531 if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
532 a = d; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
533 return; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
537 case 2: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
538 asdfasdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
539 aasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
540 a = 9; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
541 case 3: if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
542 aasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
543 a = 9; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
544 case 4: x = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
545 y = 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
546 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
547 label: if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
548 here; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
549 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
550 label: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
551 asdfasdf) |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
555 label: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
556 asdfasdf) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
557 there; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
560 label: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
561 asdfasdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
562 there; |
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 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
567 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
|
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 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
571 hello with ":set comments= cino=" |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
577 if (a < b) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
578 a = a + 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
579 } else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
580 a = a + 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
581 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
582 if (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
583 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
584 testing; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
585 } while (asdfasdf); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
586 a = b + 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
587 asdfasdf |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
591 for ( int i = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
592 i < 10; i++ ) |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
595 i = 0; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
598 class bob |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
599 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
600 int foo() {return 1;} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
601 int bar; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
604 main() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
605 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
606 while(1) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
607 if (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
608 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
609 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
610 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
611 else { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
612 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
613 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
614 misplacedline; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
618 if (clipboard.state == SELECT_DONE |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
619 && ((row == clipboard.start.lnum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
620 && col >= clipboard.start.col) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
621 || row > clipboard.start.lnum)) |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
625 if (1) {i += 4;} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
626 where_am_i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
627 return 0; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
632 } // sdf(asdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
633 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
634 asd; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
638 label1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
639 label2: |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
643 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
|
644 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
|
645 f() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
646 for ( i = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
647 i < m; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
648 /* c */ i++ ) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
649 a = b; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
655 f1(/*comment*/); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
656 f2(); |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
660 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
661 if (foo) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
662 } else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
663 ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
664 } while (foo); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
665 foo(); // was wrong |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
668 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
|
669 void func() |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
673 char *tab[] = {"aaa", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
674 "};", /* }; */ NULL} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
675 int indented; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
678 char *a[] = {"aaa", "bbb", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
679 "ccc", NULL}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
680 // here |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
681 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
682 char *tab[] = {"aaa", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
683 "xx", /* xx */}; /* asdf */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
684 int not_indented; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
687 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
688 switch (bla) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
689 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
690 case 1: if (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
691 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
692 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
693 } while (boo); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
694 wrong; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
697 int foo, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
698 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
699 int foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
700 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
701 #if defined(foo) \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
702 && defined(bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
703 char * xx = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
704 foo\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
705 bor"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
706 int x; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
707 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
708 char *foo = "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 asdf", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
711 *bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
712 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
713 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
714 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
715 #if defined(foo) \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
716 && defined(bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
717 char *foo = "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 asdf", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
720 *bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
721 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
722 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
723 char *foo = "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 asdf", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
726 *bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
727 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
728 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
729 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
730 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
731 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
732 int y; // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
733 // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
734 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
735 // comment |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
738 Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
739 int b ) : BaseClass(a) |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
744 void foo() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
745 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
746 char one, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
747 two; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
748 struct bla piet, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
749 jan; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
750 enum foo kees, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
751 jannie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
752 static unsigned sdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
753 krap; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
754 unsigned int piet, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
755 jan; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
756 int |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
757 kees, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
758 jan; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
762 t(int f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
763 int d); // ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
764 d(); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
767 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
768 int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
769 ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
770 BaseClass(a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
771 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
772 c), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
773 mMember(b), |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
777 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
778 int b ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
779 BaseClass(a) |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
783 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
784 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
|
785 member(b) |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
789 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
|
790 : aa(a), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
791 bb(b), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
792 cc(c) |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
796 class CAbc : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
797 public BaseClass1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
798 protected BaseClass2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
799 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
800 int Test() { return FALSE; } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
801 int Test1() { return TRUE; } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
802 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
803 CAbc(int a, int b ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
804 BaseClass(a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
805 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
806 switch(xxx) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
807 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
808 case abc: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
809 asdf(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
810 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
811 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
812 case 999: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
813 baer(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
814 break; |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
817 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
818 public: // <-- this was incoreectly indented before!! |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
819 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
820 protected: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
821 void testfall(); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
824 class CAbc : public BaseClass1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
825 protected BaseClass2 |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
829 static struct |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
830 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
831 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
832 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
833 } variable[COUNT] = |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
836 123, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
837 456 |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
840 123, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
841 456 |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
845 static struct |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
846 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
847 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
848 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
849 } variable[COUNT] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
850 { |
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 { 123, 456 } |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
855 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
|
856 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
857 if ((0 |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
882 && 1)) break; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
885 foo() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
886 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
887 a = cond ? foo() : asdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
888 + asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
889 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
890 a = cond ? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
891 foo() : asdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
892 + asdf; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
895 int main(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
896 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
897 if (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
898 if (b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
899 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
900 else 3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
901 next_line_of_code(); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
904 barry() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
905 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
906 Foo::Foo (int one, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
907 int two) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
908 : something(4) |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
912 barry() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
913 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
914 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
|
915 : something(4) |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
919 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
920 int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
921 ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
922 BaseClass(a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
923 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
924 c), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
925 mMember(b) |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
928 int main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
929 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
930 if (lala) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
931 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
932 ++(*lolo); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
933 while (lili |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
934 && lele); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
935 lulu; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
938 int main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
939 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
940 switch (c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
941 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
942 case 'c': if (cond) |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
948 main() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
949 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
950 (void) MyFancyFuasdfadsfnction( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
951 argument); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
954 main() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
955 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
956 char foo[] = "/*"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
957 /* as |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
958 df */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
959 hello |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
962 /* valid namespaces with normal indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
963 namespace |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
966 111111111111; |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
969 namespace /* test */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
970 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
971 11111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
972 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
973 namespace // test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
974 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
975 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
976 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
977 namespace |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
978 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
979 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
980 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
981 namespace test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
982 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
983 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
984 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
985 namespace{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
986 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
987 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
988 namespace test{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
989 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
990 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
991 namespace { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
992 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
993 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
994 namespace test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
995 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
996 namespace test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
997 22222222222222222; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
998 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
999 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1000 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1001 /* invalid namespaces use block indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1002 namespace test test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1003 111111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1004 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1005 namespace11111111111 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1006 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1007 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1008 namespace() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1009 1111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1010 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1011 namespace() |
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 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1014 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1015 namespace test test2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1016 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1017 1111111111111111111; |
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 namespace111111111 |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1024 void getstring() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1025 /* Raw strings */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1026 const char* s = R"( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1027 test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1028 # comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1029 field: 123 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1030 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1031 )"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1032 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1033 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1034 void getstring() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1035 const char* s = R"foo( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1036 test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1037 # comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1038 field: 123 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1039 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1040 )foo"; |
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 int a[4] = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1045 [0] = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1046 [1] = 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1047 [2] = 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1048 [3] = 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1049 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1050 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1051 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1052 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1053 a = b[2] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1054 + 3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1055 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1056 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1057 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1058 if (1) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1059 /* aaaaa |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1060 * bbbbb |
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 a = 1; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1065 void func() |
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 switch (foo) |
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 case (bar): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1070 if (baz()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1071 quux(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1072 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1073 case (shmoo): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1074 if (!bar) |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1077 case (foo1): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1078 switch (bar) |
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 baz: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1081 baz_f(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1082 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1083 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1084 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1085 default: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1086 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1087 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1088 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1089 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1090 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1091 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1092 /* end of AUTO */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1093 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1096 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1097 call search('start of AUTO') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1098 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
|
1099 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1100 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1101 /* 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
|
1102 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1103 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1104 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1105 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1106 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1107 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1108 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1109 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1110 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1111 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1112 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1113 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1114 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1115 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1116 if (test) |
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 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1119 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1120 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1121 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1122 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1123 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1124 if (test) |
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 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1127 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1128 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1129 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1130 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1131 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1132 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1133 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1134 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1135 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1136 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1137 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1138 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1139 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1140 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1141 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1142 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1143 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1144 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1145 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1146 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1147 if (test) |
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 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1150 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1151 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1152 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1153 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1154 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1155 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1156 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1157 if (test) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1158 cmd; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1161 if (test) cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1162 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1163 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1164 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1165 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1166 for (blah) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1167 while (this) |
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 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1170 cmd3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1171 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1172 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1173 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1174 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1175 for (blah) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1176 while (this) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1177 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1178 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1179 cmd3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1180 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1181 if (test) |
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 cmd1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1184 cmd2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1185 cmd3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1186 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1187 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1188 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1189 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1190 /* 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
|
1191 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1192 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1193 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1194 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1195 asdfasd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1196 while (cond); |
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 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1199 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1200 while (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1201 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1202 while (asdf); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1205 /* 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
|
1206 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1207 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
|
1208 aal;sdkjf ( ;asldfkja;sldfk |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1209 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
|
1210 line up here; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1211 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1212 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1213 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1214 /* C++ tests: */ |
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 // 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
|
1217 // { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1218 // } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1219 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1220 /* 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
|
1221 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1222 i = 99 + 14325 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1223 21345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1224 21345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1225 21345 + ( 21345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1226 21345) + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1227 2345 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1228 1234; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1229 c = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1230 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1231 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1232 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1233 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
|
1234 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1235 here */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1236 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1237 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1238 if (testing && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1239 not a joke || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1240 line up here) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1241 hay; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1242 if (testing && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1243 (not a joke || testing |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1244 )line up here) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1245 hay; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1246 if (testing && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1247 (not a joke || testing |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1248 line up here)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1249 hay; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1250 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1251 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1252 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1253 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1254 switch (c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1255 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1256 case xx: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1257 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1258 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1259 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1260 asdfasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1261 while (asdf); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1262 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1263 asdfasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1264 while (cond); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1265 case yy: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1266 case xx: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1267 case zz: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1268 testing; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1269 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1270 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1271 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1272 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1273 if (cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1274 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1275 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1276 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1277 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1278 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1279 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1280 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1281 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1282 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1283 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
|
1284 alsdkfj (asldk;fj |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1285 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
|
1286 ;laksjfd ;lsakdjf ;alskdf asd) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1287 asdfasdf;))) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1288 asdfasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1289 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1290 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1291 int |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1292 func(a, b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1293 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1294 int c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1295 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1296 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1297 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1298 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1299 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1300 (c2 || c3) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1301 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1302 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1303 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1304 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1305 while (asd) |
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 (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1308 if (test) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1309 if (that) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1310 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1311 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1312 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1313 cdasd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1314 while (as |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1315 df); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1316 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1317 else |
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 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1320 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1321 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1322 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1323 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1324 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1325 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1326 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1327 s = "/*"; b = ';' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1328 s = "/*"; b = ';'; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1329 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1330 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1331 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1332 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1333 switch (a) |
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 case a: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1336 switch (t) |
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 case 1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1339 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1340 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1341 case 2: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1342 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1343 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1344 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1345 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1346 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1347 case b: |
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 int i; |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1352 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1353 case c: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1354 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1355 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1356 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1357 case d: if (cond && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1358 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
|
1359 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1360 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1361 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1362 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1363 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1364 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1365 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1366 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1367 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
|
1368 (bp_to->b_p_initialized || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1369 (!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
|
1370 return; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1371 label : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1372 asdf = asdf ? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1373 asdf : asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1374 asdf = asdf ? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1375 asdf: asdf; |
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 /* 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
|
1379 /* : 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
|
1380 /* : 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
|
1381 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1382 char *(array[100]) = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1383 "testje", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1384 "foo", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1385 "bar", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1386 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1387 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1388 enum soppie |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1389 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1390 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1391 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1392 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1393 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1394 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1395 typedef enum soppie |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1396 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1397 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1398 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1399 maybe |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1402 static enum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1403 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1404 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1405 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1406 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1407 } soppie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1408 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1409 public static enum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1410 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1411 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1412 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1413 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1414 } soppie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1415 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1416 static private enum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1417 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1418 yes = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1419 no, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1420 maybe |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1421 } soppie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1422 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1423 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1424 int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1425 b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1426 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1427 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1428 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1429 struct Type |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1430 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1431 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1432 char *str; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1433 } var[] = |
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 0, "zero", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1436 1, "one", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1437 2, "two", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1438 3, "three" |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1441 float matrix[3][3] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1442 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1443 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1444 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1445 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1446 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1447 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1448 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1449 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1450 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1451 5 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1452 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1453 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1454 6, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1455 7, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1456 8 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1457 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1458 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1459 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1460 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1461 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1462 /* blah ( blah */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1463 /* where does this go? */ |
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 /* blah ( blah */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1466 cmd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1467 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1468 func(arg1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1469 /* comment */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1470 arg2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1471 a; |
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 b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1474 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1475 c; /* Hey, NOW it indents?! */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1476 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1477 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1478 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1479 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1480 func(arg1, |
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 arg3); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1483 /* 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
|
1484 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1485 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1486 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1487 main () |
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 if (cond) |
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 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1492 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1493 if (cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1494 a = c; |
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 if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1497 a = d; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1498 return; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1499 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1500 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1501 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1502 case 2: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1503 asdfasdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1504 aasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1505 a = 9; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1506 case 3: if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1507 aasdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1508 a = 9; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1509 case 4: x = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1510 y = 2; |
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 label: if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1513 here; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1514 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1515 label: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1516 asdfasdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1517 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1518 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1519 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1520 label: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1521 asdfasdf) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1522 there; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1523 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1524 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1525 label: if (asdf && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1526 asdfasdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1527 there; |
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 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1532 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
|
1533 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1534 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1535 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1536 hello with ":set comments= cino=" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1537 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1538 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1539 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1540 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1541 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1542 if (a < b) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1543 a = a + 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1544 } else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1545 a = a + 2; |
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 if (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1548 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1549 testing; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1550 } while (asdfasdf); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1551 a = b + 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1552 asdfasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1553 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1554 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1555 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1556 for ( int i = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1557 i < 10; i++ ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1558 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1559 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1560 i = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1561 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1562 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1563 class bob |
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 int foo() {return 1;} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1566 int bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1567 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1568 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1569 main() |
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 while(1) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1572 if (foo) |
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 bar; |
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 else { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1577 asdf; |
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 misplacedline; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1580 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1581 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1582 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1583 if (clipboard.state == SELECT_DONE |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1584 && ((row == clipboard.start.lnum |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1585 && col >= clipboard.start.col) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1586 || row > clipboard.start.lnum)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1587 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1588 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1589 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1590 if (1) {i += 4;} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1591 where_am_i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1592 return 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1593 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1594 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1595 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1596 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1597 } // sdf(asdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1598 if (asdf) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1599 asd; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1600 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1601 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1602 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1603 label1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1604 label2: |
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 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
|
1609 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
|
1610 f() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1611 for ( i = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1612 i < m; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1613 /* c */ i++ ) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1614 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1615 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1616 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1617 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1618 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1619 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1620 f1(/*comment*/); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1621 f2(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1622 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1623 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1624 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1625 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1626 if (foo) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1627 } else |
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 } while (foo); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1630 foo(); // was wrong |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1631 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1632 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1633 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
|
1634 void func() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1635 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1636 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1637 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1638 char *tab[] = {"aaa", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1639 "};", /* }; */ NULL} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1640 int indented; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1641 {} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1642 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1643 char *a[] = {"aaa", "bbb", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1644 "ccc", NULL}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1645 // here |
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 char *tab[] = {"aaa", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1648 "xx", /* xx */}; /* asdf */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1649 int not_indented; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1650 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1651 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1652 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1653 switch (bla) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1654 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1655 case 1: if (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1656 bar; |
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 } while (boo); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1659 wrong; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1660 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1661 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1662 int foo, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1663 bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1664 int foo; |
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 #if defined(foo) \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1667 && defined(bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1668 char * xx = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1669 foo\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1670 bor"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1671 int x; |
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 char *foo = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1674 asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1675 asdf", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1676 *bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1677 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1678 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1679 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1680 #if defined(foo) \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1681 && defined(bar) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1682 char *foo = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1683 asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1684 asdf", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1685 *bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1686 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1687 int i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1688 char *foo = "asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1689 asdf\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1690 asdf", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1691 *bar; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1692 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1693 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1694 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1695 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1696 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1697 int y; // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1698 // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1699 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1700 // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1701 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1702 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1703 Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1704 int b ) : BaseClass(a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1705 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1706 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1707 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1708 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1709 void foo() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1710 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1711 char one, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1712 two; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1713 struct bla piet, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1714 jan; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1715 enum foo kees, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1716 jannie; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1717 static unsigned sdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1718 krap; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1719 unsigned int piet, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1720 jan; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1721 int |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1722 kees, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1723 jan; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1724 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1725 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1726 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1727 t(int f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1728 int d); // ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1729 d(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1730 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1731 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1732 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1733 int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1734 ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1735 BaseClass(a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1736 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1737 c), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1738 mMember(b), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1739 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1740 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1741 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1742 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1743 int b ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1744 BaseClass(a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1745 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1746 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1747 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1748 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1749 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
|
1750 member(b) |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1754 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
|
1755 : aa(a), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1756 bb(b), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1757 cc(c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1758 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1759 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1760 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1761 class CAbc : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1762 public BaseClass1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1763 protected BaseClass2 |
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 int Test() { return FALSE; } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1766 int Test1() { return TRUE; } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1767 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1768 CAbc(int a, int b ) : |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1769 BaseClass(a) |
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 switch(xxx) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1772 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1773 case abc: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1774 asdf(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1775 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1776 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1777 case 999: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1778 baer(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1779 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1780 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1781 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1782 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1783 public: // <-- this was incoreectly indented before!! |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1784 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1785 protected: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1786 void testfall(); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1789 class CAbc : public BaseClass1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1790 protected BaseClass2 |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1794 static struct |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1795 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1796 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1797 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1798 } variable[COUNT] = |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1801 123, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1802 456 |
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 123, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1806 456 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1807 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1808 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1809 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1810 static struct |
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 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1813 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1814 } variable[COUNT] = |
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, 456 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1817 { 123, 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 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
|
1821 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1822 if ((0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1823 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1824 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1825 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1826 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1827 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1828 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1829 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1830 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1831 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1832 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1833 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1834 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1835 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1836 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1837 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1838 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1839 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1840 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1841 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1842 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1843 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1844 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1845 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1846 && 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1847 && 1)) break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1848 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1849 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1850 foo() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1851 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1852 a = cond ? foo() : asdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1853 + asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1854 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1855 a = cond ? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1856 foo() : asdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1857 + asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1858 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1859 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1860 int main(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1861 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1862 if (a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1863 if (b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1864 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1865 else 3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1866 next_line_of_code(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1867 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1868 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1869 barry() |
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 Foo::Foo (int one, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1872 int two) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1873 : something(4) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1874 {} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1875 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1876 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1877 barry() |
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 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
|
1880 : something(4) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1881 {} |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1882 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1883 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1884 Constructor::Constructor(int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1885 int b |
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 BaseClass(a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1888 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1889 c), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1890 mMember(b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1891 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1892 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1893 int main () |
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 if (lala) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1896 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1897 ++(*lolo); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1898 while (lili |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1899 && lele); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1900 lulu; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1901 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1902 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1903 int main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1904 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1905 switch (c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1906 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1907 case 'c': if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1908 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1909 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1910 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1911 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1912 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1913 main() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1914 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1915 (void) MyFancyFuasdfadsfnction( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1916 argument); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1919 main() |
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 char foo[] = "/*"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1922 /* as |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1923 df */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1924 hello |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1927 /* valid namespaces with normal indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1928 namespace |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1931 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1932 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1933 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1934 namespace /* test */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1935 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1936 11111111111111111; |
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 namespace // test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1939 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1940 111111111111111111; |
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 namespace |
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 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1945 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1946 namespace test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1947 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1948 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1949 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1950 namespace{ |
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 test{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1954 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1955 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1956 namespace { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1957 111111111111111111; |
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 namespace test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1960 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1961 namespace test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1962 22222222222222222; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1963 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1964 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1965 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1966 /* invalid namespaces use block indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1967 namespace test test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1968 111111111111111111111; |
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 namespace11111111111 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1971 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1972 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1973 namespace() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1974 1111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1975 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1976 namespace() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1977 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1978 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1979 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1980 namespace test test2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1981 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1982 1111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1983 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1984 namespace111111111 |
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 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1987 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1988 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1989 void getstring() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1990 /* Raw strings */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1991 const char* s = R"( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1992 test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1993 # comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1994 field: 123 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1995 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1996 )"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1997 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1998 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
1999 void getstring() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2000 const char* s = R"foo( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2001 test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2002 # comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2003 field: 123 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2004 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2005 )foo"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2006 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2007 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2008 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2009 int a[4] = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2010 [0] = 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2011 [1] = 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2012 [2] = 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2013 [3] = 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2014 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2015 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2016 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2017 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2018 a = b[2] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2019 + 3; |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2023 if (1) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2024 /* aaaaa |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2025 * bbbbb |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2026 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2027 a = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2028 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2029 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2030 void func() |
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 switch (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2033 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2034 case (bar): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2035 if (baz()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2036 quux(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2037 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2038 case (shmoo): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2039 if (!bar) |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2042 case (foo1): |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2043 switch (bar) |
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 case baz: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2046 baz_f(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2047 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2048 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2049 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2050 default: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2051 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2052 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2053 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2054 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2055 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2056 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2057 /* end of AUTO */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2058 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2059 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2060 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2061 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
|
2062 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2063 endfunc |
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 func Test_cindent_2() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2066 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2067 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
|
2068 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
|
2069 let &wm = &columns - 20 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2070 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2071 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
|
2072 { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2073 |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2074 /* this is |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2075 * 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
|
2076 * comment |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2077 */ |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
2078 /* 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
|
2079 } |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2080 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2083 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2084 call search('serious', 'e') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2085 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
|
2086 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2087 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2088 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2089 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2090 /* this is |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2091 * a real serious |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2092 * about life, the |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2093 * universe, and the |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2094 * rest important big |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2095 * comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2096 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2097 /* 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
|
2098 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2099 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2100 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2101 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2102 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
|
2103 set wm& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2104 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2105 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2106 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2107 func Test_cindent_3() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2108 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2109 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
|
2110 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2111 let code =<< trim [CODE] |
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 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2114 * 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
|
2115 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2116 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2117 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2118 * what happens here? |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2119 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2120 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2121 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2122 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
|
2123 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2124 /* how about |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2125 this one */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2126 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2127 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2128 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2129 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2130 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2131 call search('comments') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2132 normal joabout life |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2133 call search('happens') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2134 normal jothere |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2135 call search('below') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2136 normal oline |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2137 call search('this') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2138 normal Ohello |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2141 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2142 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2143 * 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
|
2144 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2145 about life |
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 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2148 * what happens here? |
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 there |
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 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2153 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
|
2154 line |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2155 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2156 /* how about |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2157 hello |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2158 this one */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2159 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2160 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2161 [CODE] |
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 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
|
2164 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2165 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2166 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2167 func Test_cindent_4() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2168 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2169 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
|
2170 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2171 let code =<< trim [CODE] |
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 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
|
2174 + vec[1] * vec[1] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2175 + vec2[2] * vec[2]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2176 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2177 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2180 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2181 call search('vec2') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2182 normal == |
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 let expected =<< trim [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 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
|
2187 + vec[1] * vec[1] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2188 + vec2[2] * vec[2]; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2191 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2192 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2193 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
|
2194 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2195 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2196 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2197 func Test_cindent_5() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2198 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2199 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
|
2200 setl cino=}4 |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2203 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2204 asdf asdflkajds f; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2205 if (tes & ting) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2206 asdf asdf asdf ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2207 asdfa sdf asdf; |
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 testing1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2210 if (tes & ting) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2211 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2212 asdf asdf asdf ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2213 asdfa sdf asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2214 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2215 testing2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2216 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2217 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2218 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2219 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2220 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2221 call search('testing1') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2222 exe "normal k2==/testing2\<CR>" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2223 normal k2== |
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 expected =<< 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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2241 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2242 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2243 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
|
2244 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2245 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2246 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2247 func Test_cindent_6() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2248 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2249 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
|
2250 setl cino=(0,)20 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2251 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2252 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2253 main ( int first_par, /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2254 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2255 * first par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2256 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2257 int second_par /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2258 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2259 * second par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2260 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2261 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2262 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2263 func( first_par, /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2264 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2265 * first par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2266 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2267 second_par /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2268 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2269 * second par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2270 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2271 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2272 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2273 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2274 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2275 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2276 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2277 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2278 call search('main') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2279 normal =][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2280 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2281 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2282 main ( int first_par, /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2283 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2284 * first par |
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 int second_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 * second 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 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2291 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2292 func( first_par, /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2293 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2294 * first par |
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 second_par /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2297 * Comment for |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2298 * second par |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2299 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2300 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2301 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2302 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2303 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2304 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2305 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2306 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
|
2307 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2308 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2309 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2310 func Test_cindent_7() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2311 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2312 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
|
2313 setl cino=es,n0s |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2316 main(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2317 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2318 /* 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
|
2319 if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2320 foo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2321 else |
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 bar(); |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2327 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2328 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2329 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2330 call search('main') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2331 normal =][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2334 main(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2335 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2336 /* 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
|
2337 if (cond) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2338 foo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2339 else |
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 bar(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2342 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2343 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2344 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2345 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2346 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2347 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
|
2348 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2349 endfunc |
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 func Test_cindent_8() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2352 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2353 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
|
2354 setl cino= |
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 code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2357 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2358 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2359 do |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2360 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2361 if () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2362 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2363 if () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2364 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2365 else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2366 asdf; |
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 } while (); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2369 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
|
2370 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2371 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2372 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2373 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2374 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2375 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2376 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2377 let expected =<< trim [CODE] |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2380 do |
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 if () |
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 asdf; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2386 else |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2389 } while (); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2390 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
|
2391 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2392 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2393 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2394 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2395 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
|
2396 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2397 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2398 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2399 func Test_cindent_9() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2400 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2401 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
|
2402 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2403 let code =<< trim [CODE] |
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 void f() |
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 ( k() ) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2408 l(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2409 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2410 } else { /* Start (two words) end */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2411 m(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2412 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2413 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2414 n(); |
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 append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2419 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2420 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2423 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2424 void f() |
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 if ( k() ) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2427 l(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2428 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2429 } else { /* Start (two words) end */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2430 m(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2431 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2432 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2433 n(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2434 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2435 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2436 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2437 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2438 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
|
2439 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2440 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2441 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2442 func Test_cindent_10() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2443 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2444 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
|
2445 setl cino={s,e-s |
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 let code =<< trim [CODE] |
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 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2450 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2451 if ( k() ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2452 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2453 l(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2454 } else { /* Start (two words) end */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2455 m(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2456 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2457 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
|
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 append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2462 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2463 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2466 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2467 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2468 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2469 if ( k() ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2470 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2471 l(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2472 } else { /* Start (two words) end */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2473 m(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2474 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2475 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
|
2476 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2477 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2478 [CODE] |
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 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
|
2481 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2482 endfunc |
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 func Test_cindent_11() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2485 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2486 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
|
2487 setl cino={s,fs |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2488 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2489 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2490 void bar(void) |
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 static array[2][2] = |
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 { 1, 2 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2495 { 3, 4 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2496 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2497 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2498 while (a) |
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 foo(&a); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2501 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2502 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2503 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2504 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2505 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2506 a = a + 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2507 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2508 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2509 b = a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2510 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2511 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2512 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2513 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2514 a = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2515 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2516 b = 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2517 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2518 c = 3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2519 d = 4; |
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 /* foo */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2522 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2523 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2524 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2525 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2526 exe "normal ]]=/ foo\<CR>" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2527 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2528 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2529 void bar(void) |
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 static array[2][2] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2532 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2533 { 1, 2 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2534 { 3, 4 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2535 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2536 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2537 while (a) |
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 foo(&a); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2540 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2541 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2542 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2543 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2544 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2545 a = a + 1; |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2548 b = a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2549 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2550 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2551 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2552 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2553 a = 1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2554 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2555 b = 2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2556 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2557 c = 3; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2558 d = 4; |
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 /* foo */ |
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 [CODE] |
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 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
|
2565 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2566 endfunc |
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 func Test_cindent_12() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2569 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2570 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
|
2571 setl cino= |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2574 a() |
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 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2577 a = a + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2578 a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2579 } 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
|
2580 if ( a ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2581 a; |
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 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2586 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2587 call search('while') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2588 normal ohere |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2589 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2590 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2591 a() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2592 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2593 do { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2594 a = a + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2595 a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2596 } 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
|
2597 here |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2598 if ( a ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2599 a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2600 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2601 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2602 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2603 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2604 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
|
2605 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2606 endfunc |
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 func Test_cindent_13() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2609 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2610 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
|
2611 setl cino= com= |
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 code =<< 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 label1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2617 /* hmm */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2618 // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2619 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2620 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2621 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2622 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2623 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2624 call search('comment') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2625 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
|
2626 \ "f(/*com*/);\rif (/*com*/)\rcmd();" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2627 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2628 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2629 a() |
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 label1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2632 /* hmm */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2633 // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2634 label2: b(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2635 label3 /* post */: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2636 /* pre */ label4: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2637 f(/*com*/); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2638 if (/*com*/) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2639 cmd(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2640 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2641 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2642 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2643 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2644 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
|
2645 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2646 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2647 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2648 func Test_cindent_14() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2649 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2650 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
|
2651 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
|
2652 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2653 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2654 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2655 * A simple comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2656 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2657 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2658 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2659 ** A different comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2660 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2661 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2662 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2663 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2664 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2665 call search('simple') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2666 normal =5j |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2667 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2668 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2669 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2670 * A simple comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2671 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2672 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2673 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2674 ** A different comment |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2677 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2678 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2679 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
|
2680 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2681 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2682 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2683 func Test_cindent_15() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2684 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2685 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
|
2686 setl cino=c0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2687 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
|
2688 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2689 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2690 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2691 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2692 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2693 /********* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2694 A comment. |
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 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2700 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2701 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2702 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2703 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2704 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2705 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2706 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2707 /********* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2708 A comment. |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2709 *********/ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2710 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2711 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2712 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2713 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2714 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
|
2715 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2716 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2717 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2718 func Test_cindent_16() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2719 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2720 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
|
2721 setl cino=c0,C1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2722 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
|
2723 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2724 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2725 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2726 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2727 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2728 /********* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2729 A comment. |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2732 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2735 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2736 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2737 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2738 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2739 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2740 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2741 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2742 /********* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2743 A comment. |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2744 *********/ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2745 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2746 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2747 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2748 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2749 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
|
2750 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2751 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2752 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2753 func Test_cindent_17() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2754 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2755 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
|
2756 setl cino= |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2757 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2758 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2759 void f() |
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 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2762 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2763 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2764 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2765 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2766 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2767 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2770 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2771 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2772 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2773 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2774 void f() |
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 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2777 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2778 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2779 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2780 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2781 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2782 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2783 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2784 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2785 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
|
2786 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2787 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2788 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2789 func Test_cindent_18() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2790 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2791 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
|
2792 setl cino=(s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2793 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2794 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2795 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2796 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2797 c = c1 && |
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 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2800 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2801 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2802 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2803 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2806 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2807 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2808 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2809 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2810 void f() |
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 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2813 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2814 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2815 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2816 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2817 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2818 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2819 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2820 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2821 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
|
2822 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2823 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2824 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2825 func Test_cindent_19() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2826 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2827 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
|
2828 set cino=(s,U1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2829 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2830 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2831 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2832 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2833 c = c1 && |
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 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2836 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2837 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2838 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2839 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2842 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2843 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2844 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2845 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2846 void f() |
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 c = c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2849 ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2850 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2851 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2852 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2853 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2854 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2855 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2856 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2857 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
|
2858 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2859 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2860 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2861 func Test_cindent_20() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2862 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2863 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
|
2864 setl cino=(0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2865 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2866 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2867 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2868 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2869 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2870 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2871 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2872 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2873 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2874 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2875 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2876 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2877 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2878 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2881 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2882 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2883 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2884 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2885 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2886 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2887 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2888 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2889 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2890 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2891 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
|
2892 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2893 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2894 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2895 func Test_cindent_21() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2896 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2897 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
|
2898 setl cino=(0,w1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2899 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2900 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2901 void f() |
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 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2904 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2905 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2906 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2907 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2908 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2909 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2910 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2911 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2912 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2915 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2916 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2917 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2918 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2919 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2920 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2921 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2922 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2923 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2924 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2925 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
|
2926 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2927 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2928 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2929 func Test_cindent_22() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2930 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2931 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
|
2932 setl cino=(s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2933 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2934 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2935 void f() |
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 c = c1 && ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2938 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2939 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2940 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2941 if ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2942 c1 && c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2943 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2944 foo; |
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 append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2949 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2950 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2953 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2954 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2955 c = c1 && ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2956 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2957 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2958 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2959 if ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2960 c1 && c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2961 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2962 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2963 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2964 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2965 [CODE] |
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 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
|
2968 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2969 endfunc |
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 func Test_cindent_23() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2972 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2973 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
|
2974 setl cino=(s,m1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2975 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2976 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2977 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2978 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2979 c = c1 && ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2980 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2981 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2982 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2983 if ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2984 c1 && c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2985 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2986 foo; |
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 append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2991 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2992 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2995 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2996 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2997 c = c1 && ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2998 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
2999 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3000 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3001 if ( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3002 c1 && c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3003 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3004 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3005 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3006 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3007 [CODE] |
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 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
|
3010 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3011 endfunc |
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 func Test_cindent_24() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3014 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3015 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
|
3016 setl cino=b1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3017 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3018 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3019 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3020 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3021 switch (x) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3022 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3023 case 1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3024 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3025 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3026 default: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3027 a = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3028 break; |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3031 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3032 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3033 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3034 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3035 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3036 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3037 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3038 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3039 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3040 switch (x) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3041 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3042 case 1: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3043 a = b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3044 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3045 default: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3046 a = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3047 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3048 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3049 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3050 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3051 [CODE] |
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 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
|
3054 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3055 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3056 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3057 func Test_cindent_25() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3058 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3059 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
|
3060 setl cino=(0,W5 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3061 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3062 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3063 void f() |
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 invokeme( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3066 argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3067 ment); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3068 invokeme( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3069 argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3070 ment |
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 invokeme(argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3073 ment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3074 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3075 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3076 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3077 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3078 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3079 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3080 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3081 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3082 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3083 void f() |
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 invokeme( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3086 argu, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3087 ment); |
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 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3092 invokeme(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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3096 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3097 [CODE] |
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 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
|
3100 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3101 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3102 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3103 func Test_cindent_26() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3104 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3105 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
|
3106 setl cino=/6 |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3109 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3110 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3111 statement; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3112 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3113 // comment 2 |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3116 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3117 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3118 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3119 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3120 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3121 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3122 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3123 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3124 statement; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3125 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3126 // comment 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3127 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3128 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3129 [CODE] |
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 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
|
3132 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3133 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3134 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3135 func Test_cindent_27() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3136 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3137 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
|
3138 setl cino= |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3141 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3142 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3143 statement; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3144 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3145 // comment 2 |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3148 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3149 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3150 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3151 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
|
3152 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3153 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3154 void f() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3155 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3156 statement; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3157 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3158 // comment 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3159 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3160 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3161 [CODE] |
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 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
|
3164 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3165 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3166 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3167 func Test_cindent_28() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3168 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3169 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
|
3170 setl cino=g0 |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3173 class CAbc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3174 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3175 int Test() { return FALSE; } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3176 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3177 public: // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3178 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3179 protected: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3180 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3181 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3182 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3185 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3186 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3187 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3188 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3189 class CAbc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3190 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3191 int Test() { return FALSE; } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3192 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3193 public: // comment |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3194 void testfall(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3195 protected: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3196 void testfall(); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3199 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3200 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3201 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
|
3202 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3203 endfunc |
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 func Test_cindent_29() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3206 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3207 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
|
3208 setl cino=(0,gs,hs |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3209 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3210 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3211 class Foo : public Bar |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3212 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3213 public: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3214 virtual void method1(void) = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3215 virtual void method2(int arg1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3216 int arg2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3217 int arg3) = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3218 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3219 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3222 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3223 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3224 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3225 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3226 class Foo : public Bar |
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 public: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3229 virtual void method1(void) = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3230 virtual void method2(int arg1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3231 int arg2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3232 int arg3) = 0; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3233 }; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3234 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3235 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3236 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3237 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
|
3238 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3239 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3240 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3241 func Test_cindent_30() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3242 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3243 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
|
3244 setl cino=+20 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3245 |
17172
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3246 let code =<< [CODE] |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3247 void |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3248 foo() |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3249 { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3250 if (a) |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3251 { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3252 } else |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3253 asdf; |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3254 } |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3255 [CODE] |
16865
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3258 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3259 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3260 |
17172
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3261 let expected =<< [CODE] |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3262 void |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3263 foo() |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3264 { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3265 if (a) |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3266 { |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3267 } else |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3268 asdf; |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3269 } |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3270 |
6990c1160ea5
patch 8.1.1585: :let-heredoc does not trim enough
Bram Moolenaar <Bram@vim.org>
parents:
16865
diff
changeset
|
3271 [CODE] |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3272 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3273 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
|
3274 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3275 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3276 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3277 func Test_cindent_31() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3278 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3279 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
|
3280 setl cino=(0,W2s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3281 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3282 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3283 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3284 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3285 averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3286 asdasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3287 func(asdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3288 asdfadsf), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3289 asdfasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3290 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3291 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3292 /* those are ugly, but consequent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3293 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3294 func()->asd(asdasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3295 averylongfunctionname( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3296 abc, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3297 dec)->averylongfunctionname( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3298 asdfadsf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3299 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3300 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3301 ), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3302 func(asdfadf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3303 asdfasdf |
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 asdasdf |
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 averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3309 abc, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3310 dec)->asdfasdfasdf( |
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 asdfasdf, |
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 func(asdfadf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3316 asdfasdf), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3317 asdasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3318 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3319 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3320 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3321 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3322 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3323 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3324 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3325 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3326 let expected =<< trim [CODE] |
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 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3329 averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3330 asdasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3331 func(asdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3332 asdfadsf), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3333 asdfasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3334 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3335 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3336 /* those are ugly, but consequent */ |
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()->asd(asdasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3339 averylongfunctionname( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3340 abc, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3341 dec)->averylongfunctionname( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3342 asdfadsf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3343 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3344 asdfasdf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3345 ), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3346 func(asdfadf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3347 asdfasdf |
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 asdasdf |
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 averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3353 abc, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3354 dec)->asdfasdfasdf( |
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 asdfasdf, |
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 func(asdfadf, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3360 asdfasdf), |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3361 asdasdf |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3362 ); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3363 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3364 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3365 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3366 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3367 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
|
3368 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3369 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3370 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3371 func Test_cindent_32() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3372 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3373 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
|
3374 setl cino=M1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3375 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3376 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3377 int main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3378 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3379 if (cond1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3380 cond2 |
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 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3383 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3384 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3387 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3388 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3391 int main () |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3392 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3393 if (cond1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3394 cond2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3395 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3396 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3397 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3398 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3399 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3400 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3401 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
|
3402 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3403 endfunc |
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 func Test_cindent_33() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3406 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3407 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
|
3408 setl cino=(0,ts |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3409 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3410 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3411 void func(int a |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3412 #if defined(FOO) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3413 , int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3414 , int c |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3415 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3416 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3417 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3418 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3419 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3422 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3423 normal 2j=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3424 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3425 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3426 void func(int a |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3427 #if defined(FOO) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3428 , int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3429 , int c |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3430 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3431 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3432 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3433 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3434 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3435 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3436 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3437 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
|
3438 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3439 endfunc |
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 func Test_cindent_34() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3442 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3443 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
|
3444 setl cino=(0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3445 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3446 let code =<< trim [CODE] |
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 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3449 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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3458 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3459 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3460 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3461 normal =][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3462 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3463 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
|
3464 |
16865
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3465 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3466 func(int a |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3467 #if defined(FOO) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3468 , int b |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3469 , int c |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3470 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3471 ) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3472 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3473 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3474 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3475 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3476 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3477 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
|
3478 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3479 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3480 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3481 func Test_cindent_35() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3482 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3483 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
|
3484 setl cino& |
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 code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3487 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3488 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3489 if(x==y) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3490 if(y==z) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3491 foo=1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3492 else { bar=1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3493 baz=2; |
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 printf("Foo!\n"); |
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 void func1(void) |
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 char* tab[] = {"foo", "bar", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3501 "baz", "quux", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3502 "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
|
3503 foo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3504 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3505 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3506 void func2(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3507 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3508 int tab[] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3509 {1, 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3510 3, 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3511 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3512 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3513 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
|
3514 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3515 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3516 int foo[] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3517 #ifdef BAR |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3518 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3519 = { 1, 2, 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3520 4, 5, 6 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3521 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3522 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3523 ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3524 int baz; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3525 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3526 void func3(void) |
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 int tab[] = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3529 1, 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3530 3, 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3531 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3532 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3533 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
|
3534 } |
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 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3537 func4(a, b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3538 c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3539 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3540 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3541 int c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3542 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3543 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3544 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3545 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3546 func5( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3547 int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3548 int b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3549 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3550 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3551 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3552 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3553 func6( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3554 int a) |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3557 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3560 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3561 normal ]]=7][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3562 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3563 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3564 void func(void) |
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 if(x==y) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3567 if(y==z) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3568 foo=1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3569 else { bar=1; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3570 baz=2; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3571 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3572 printf("Foo!\n"); |
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 func1(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3576 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3577 char* tab[] = {"foo", "bar", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3578 "baz", "quux", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3579 "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
|
3580 foo(); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3583 void func2(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3584 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3585 int tab[] = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3586 {1, 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3587 3, 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3588 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3589 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3590 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
|
3591 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3592 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3593 int foo[] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3594 #ifdef BAR |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3595 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3596 = { 1, 2, 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3597 4, 5, 6 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3598 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3599 #endif |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3600 ; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3601 int baz; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3602 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3603 void func3(void) |
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 int tab[] = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3606 1, 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3607 3, 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3608 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3609 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3610 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
|
3611 } |
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 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3614 func4(a, b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3615 c) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3616 int a; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3617 int b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3618 int c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3619 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3620 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3621 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3622 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3623 func5( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3624 int a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3625 int b) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3626 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3627 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3628 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3629 void |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3630 func6( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3631 int a) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3632 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3633 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3634 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3635 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3636 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3637 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
|
3638 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3639 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3640 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3641 func Test_cindent_36() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3642 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3643 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
|
3644 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3645 setl cino+=l1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3646 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3647 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3648 void func(void) |
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 int tab[] = |
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 1, 2, 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3653 4, 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3654 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3655 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
|
3656 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3657 switch (foo) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3658 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3659 case bar: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3660 printf("bar"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3661 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3662 case baz: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3663 printf("baz"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3664 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3665 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3666 case quux: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3667 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
|
3668 break; |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3671 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3674 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3675 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3676 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3677 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3678 void func(void) |
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 int tab[] = |
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 1, 2, 3, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3683 4, 5, 6}; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3684 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3685 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
|
3686 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3687 switch (foo) |
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 bar: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3690 printf("bar"); |
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 case baz: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3693 printf("baz"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3694 break; |
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 case quux: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3697 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
|
3698 break; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3699 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3700 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3701 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3702 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3703 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3704 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
|
3705 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3706 endfunc |
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 func Test_cindent_37() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3709 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3710 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
|
3711 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3712 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3713 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3714 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3715 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3716 cout << "a" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3717 << "b" |
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 << "c"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3720 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3721 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3724 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3725 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3728 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3729 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3730 cout << "a" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3731 << "b" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3732 << ") :" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3733 << "c"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3734 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3735 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3736 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3737 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3738 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
|
3739 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3740 endfunc |
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 func Test_cindent_38() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3743 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3744 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
|
3745 setl com=s1:/*,m:*,ex:*/ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3746 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3747 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3748 void func(void) |
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 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3751 * This is a comment. |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3754 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3757 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3758 normal ]]3jofoo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3759 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3760 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3761 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3762 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3763 /* |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3764 * This is a comment. |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3765 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3766 foo(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3767 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3768 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3769 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3770 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3771 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
|
3772 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3773 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3774 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3775 func Test_cindent_39() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3776 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3777 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
|
3778 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3779 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3780 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3781 void func(void) |
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 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
|
3784 if (i & 1) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3785 foo(1); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3786 } else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3787 foo(0); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3788 baz(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3789 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3790 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3793 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3794 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3795 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3796 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3797 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3798 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3799 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
|
3800 if (i & 1) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3801 foo(1); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3802 } else |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3803 foo(0); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3804 baz(); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3807 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3808 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3809 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
|
3810 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3811 endfunc |
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 func Test_cindent_40() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3814 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3815 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
|
3816 setl cino=k2s,(0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3817 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3818 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3819 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3820 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3821 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3822 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3823 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3824 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3825 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3826 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3827 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3828 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3829 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3830 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3831 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3832 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3833 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3834 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3835 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3836 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3837 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3838 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3839 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3840 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3841 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3842 foo; |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3845 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3846 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3847 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3848 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3851 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3852 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3853 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3854 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3855 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3856 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3857 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3858 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3859 if (c1 && (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 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3863 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3864 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3865 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3866 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3867 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3868 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3869 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3870 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3871 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3872 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3873 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3874 foo; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3877 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3878 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3879 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
|
3880 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3881 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3882 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3883 func Test_cindent_41() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3884 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3885 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
|
3886 setl cino=k2s,(s |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3889 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3890 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3891 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3892 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3893 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3894 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3895 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3896 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3897 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3898 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3899 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3900 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3901 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3902 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3903 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3904 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3905 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3906 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3907 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3908 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3909 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3910 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3911 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3912 foo; |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3915 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3916 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3917 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3918 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3921 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3922 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3923 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3924 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3925 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3926 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3927 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3928 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3929 if (c1 && (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 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3933 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3934 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3935 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3936 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3937 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3938 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3939 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3940 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3941 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3942 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3943 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3944 foo; |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3947 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3948 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3949 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
|
3950 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3951 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3952 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3953 func Test_cindent_42() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3954 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3955 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
|
3956 setl cino=k2s,(s,U1 |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3959 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3960 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3961 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3962 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3963 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3964 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3965 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3966 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3967 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3968 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3969 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3970 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3971 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3972 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3973 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3974 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3975 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3976 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3977 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3978 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3979 c = c1 && |
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 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3982 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3983 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3984 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3985 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3986 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3987 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3988 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3989 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3990 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3991 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3992 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3993 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3994 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3995 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3996 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3997 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3998 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
3999 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4000 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4001 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4002 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4003 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4004 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4005 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4006 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4007 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4008 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4009 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4010 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4011 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4012 c = c1 && |
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 c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4015 c3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4016 ) && c4; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4017 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4018 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4019 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4020 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4021 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
|
4022 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4023 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4024 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4025 func Test_cindent_43() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4026 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4027 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
|
4028 setl cino=k2s,(0,W4 |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4031 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4032 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4033 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4034 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4035 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4036 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4037 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4038 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4039 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4040 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4041 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4042 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4043 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4044 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4045 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4046 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4047 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4048 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4049 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4050 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4051 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4052 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4053 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4054 foo; |
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 a_long_line( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4057 argument, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4058 argument); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4059 a_short_line(argument, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4060 argument); |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4063 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4064 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4065 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4066 normal ]]=][ |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4069 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4070 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4071 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4072 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4073 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4074 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4075 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4076 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4077 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4078 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4079 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4080 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4081 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4082 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4083 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4084 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4085 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4086 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4087 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4088 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4089 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4090 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4091 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4092 foo; |
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 a_long_line( |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4095 argument, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4096 argument); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4097 a_short_line(argument, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4098 argument); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4101 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4102 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4103 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
|
4104 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4105 endfunc |
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 func Test_cindent_44() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4108 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4109 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
|
4110 setl cino=k2s,u2 |
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 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4113 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4114 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4115 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4116 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4117 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4118 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4119 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4120 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4121 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4122 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4123 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4124 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4125 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4126 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4127 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4128 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4129 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4130 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4131 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4132 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4133 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4136 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4137 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4138 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4139 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4140 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4141 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4142 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4143 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4144 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4145 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4146 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4147 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4148 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4149 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4150 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4151 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4152 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4153 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4154 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4155 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4156 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4157 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4158 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4159 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4160 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4161 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4162 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4163 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
|
4164 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4165 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4166 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4167 func Test_cindent_45() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4168 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4169 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
|
4170 setl cino=k2s,(0,w1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4171 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4172 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4173 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4174 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4175 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4176 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4177 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4178 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4179 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4180 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4181 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4182 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4183 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4184 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4185 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4186 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4187 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4188 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4189 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4190 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4191 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4192 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4193 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4194 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4195 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4196 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4197 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4198 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4199 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4200 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4201 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4202 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4205 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4206 normal ]]=][ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4207 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4208 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4209 void func(void) |
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 (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4212 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4213 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4214 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4215 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4216 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4217 if (c1 && (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 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4221 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4222 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4223 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4224 if (c123456789 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4225 && (c22345 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4226 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4227 printf("foo\n"); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4228 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4229 if ( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4230 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4231 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4232 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4233 func( c1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4234 && ( c2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4235 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4236 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4237 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4238 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4239 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4240 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4241 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
|
4242 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4243 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4244 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4245 func Test_cindent_46() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4246 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4247 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
|
4248 setl cino=k2,(s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4249 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4250 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4251 void func(void) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4252 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4253 if (condition1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4254 && condition2) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4255 action(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4256 function(argument1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4257 && argument2); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4258 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4259 if (c1 && (c2 || |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4260 c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4261 foo; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4262 if (c1 && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4263 (c2 || c3)) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4264 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4265 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4266 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4267 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4268 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4269 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4270 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4271 normal ]]=][ |
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 expected =<< 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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4291 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4292 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4293 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
|
4294 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4295 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4296 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4297 func Test_cindent_47() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4298 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4299 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
|
4300 setl cino=N-s |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4301 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4302 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4303 NAMESPACESTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4304 /* valid namespaces with normal indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4305 namespace |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4306 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4307 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4308 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4309 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4310 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4311 namespace /* test */ |
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 11111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4314 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4315 namespace // test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4316 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4317 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4318 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4319 namespace |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4320 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4321 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4322 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4323 namespace test |
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 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4326 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4327 namespace test::cpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4328 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4329 111111111111111111; |
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 namespace ::incorrectcpp17 |
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 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4334 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4335 namespace test::incorrectcpp17:: |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4336 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4337 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4338 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4339 namespace test:incorrectcpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4340 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4341 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4342 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4343 namespace test:::incorrectcpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4344 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4345 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4346 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4347 namespace{ |
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{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4351 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4352 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4353 namespace { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4354 111111111111111111; |
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 namespace test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4357 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4358 namespace test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4359 22222222222222222; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4360 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4361 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4362 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4363 /* invalid namespaces use block indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4364 namespace test test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4365 111111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4366 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4367 namespace11111111111 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4368 111111111111; |
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 1111111111111; |
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() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4374 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4375 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4376 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4377 namespace test test2 |
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 1111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4380 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4381 namespace111111111 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4382 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4383 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4384 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4385 NAMESPACEEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4386 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4387 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4388 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4389 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4390 call search('^NAMESPACESTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4391 exe "normal =/^NAMESPACEEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4392 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4393 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4394 NAMESPACESTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4395 /* valid namespaces with normal indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4396 namespace |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4397 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4398 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4399 111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4400 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4401 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4402 namespace /* test */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4403 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4404 11111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4405 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4406 namespace // test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4407 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4408 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4409 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4410 namespace |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4411 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4412 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4413 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4414 namespace test |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4415 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4416 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4417 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4418 namespace test::cpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4419 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4420 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4421 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4422 namespace ::incorrectcpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4423 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4424 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4425 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4426 namespace test::incorrectcpp17:: |
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 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4429 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4430 namespace test:incorrectcpp17 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4431 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4432 111111111111111111; |
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 namespace test:::incorrectcpp17 |
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 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4437 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4438 namespace{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4439 111111111111111111; |
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 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4443 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4444 namespace { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4445 111111111111111111; |
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 namespace test { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4448 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4449 namespace test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4450 22222222222222222; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4451 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4452 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4453 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4454 /* invalid namespaces use block indent */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4455 namespace test test2 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4456 111111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4457 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4458 namespace11111111111 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4459 111111111111; |
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() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4462 1111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4463 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4464 namespace() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4465 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4466 111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4467 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4468 namespace test test2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4469 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4470 1111111111111111111; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4471 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4472 namespace111111111 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4473 { |
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 NAMESPACEEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4477 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4478 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4479 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4480 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
|
4481 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4482 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4483 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4484 func Test_cindent_48() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4485 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4486 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
|
4487 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4488 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4489 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4490 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4491 var bar = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4492 foo: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4493 that: this, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4494 some: ok, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4495 }, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4496 "bar":{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4497 a : 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4498 b: "123abc", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4499 x: 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4500 "y": 5 |
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 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4503 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4504 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4505 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4506 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4507 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4508 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4509 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4510 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4511 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4512 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4513 var bar = { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4514 foo: { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4515 that: this, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4516 some: ok, |
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 "bar":{ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4519 a : 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4520 b: "123abc", |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4521 x: 4, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4522 "y": 5 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4523 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4524 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4525 JSEND |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4528 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4529 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
|
4530 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4531 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4532 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4533 func Test_cindent_49() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4534 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4535 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
|
4536 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4537 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4538 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4539 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4540 var foo = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4541 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4542 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4543 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4544 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4545 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4546 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4547 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4548 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4549 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4550 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4551 exe "normal =/^JSEND\n" |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4554 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4555 var foo = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4556 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4557 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4558 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4559 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4560 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4561 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4562 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4563 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4564 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
|
4565 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4566 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4567 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4568 func Test_cindent_50() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4569 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4570 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
|
4571 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4572 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4573 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4574 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4575 function bar() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4576 var foo = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4577 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4578 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4579 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4580 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4581 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4582 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4583 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4586 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4587 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4588 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4589 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4590 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4591 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4592 function bar() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4593 var foo = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4594 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4595 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4596 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4597 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4598 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4599 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4600 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4601 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4602 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4603 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
|
4604 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4605 endfunc |
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 func Test_cindent_51() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4608 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4609 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
|
4610 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4611 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4612 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4613 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4614 (function($){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4615 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4616 if (cond && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4617 cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4618 stmt; |
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 window.something.left = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4621 (width - 50 + offset) + "px"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4622 var class_name='myclass'; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4623 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4624 function private_method() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4625 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4626 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4627 var public_method={ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4628 method: function(options,args){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4629 private_method(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4630 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4631 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4632 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4633 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4634 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4635 $(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
|
4636 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4637 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4638 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4639 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4640 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4641 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4642 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4643 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4644 return true; |
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 }, options||{})); |
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 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4649 $.fn[class_name]=function() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4650 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4651 var _arguments=arguments; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4652 return this.each(function(){ |
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 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
|
4655 if (!options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4656 init.apply(this,_arguments); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4657 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4658 } else { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4659 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
|
4660 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4661 if (typeof(method)!='function') { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4662 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
|
4663 return false; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4664 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4665 _arguments[0]=options; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4666 method.apply(this,_arguments); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4667 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4668 }); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4669 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4670 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4671 })(jQuery); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4672 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4673 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4674 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4675 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4676 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4677 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4678 exe "normal =/^JSEND\n" |
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 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4681 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4682 (function($){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4683 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4684 if (cond && |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4685 cond) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4686 stmt; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4687 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4688 window.something.left = |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4689 (width - 50 + offset) + "px"; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4690 var class_name='myclass'; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4691 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4692 function private_method() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4693 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4694 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4695 var public_method={ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4696 method: function(options,args){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4697 private_method(); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4698 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4699 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4700 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4701 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4702 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4703 $(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
|
4704 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4705 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4706 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4707 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4708 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4709 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4710 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4711 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4712 return true; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4713 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4714 }, options||{})); |
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 $.fn[class_name]=function() { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4718 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4719 var _arguments=arguments; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4720 return this.each(function(){ |
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 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
|
4723 if (!options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4724 init.apply(this,_arguments); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4725 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4726 } else { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4727 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
|
4728 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4729 if (typeof(method)!='function') { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4730 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
|
4731 return false; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4732 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4733 _arguments[0]=options; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4734 method.apply(this,_arguments); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4735 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4736 }); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4737 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4738 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4739 })(jQuery); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4740 JSEND |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4743 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4744 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
|
4745 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4746 endfunc |
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 func Test_cindent_52() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4749 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4750 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
|
4751 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4752 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4753 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4754 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4755 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4756 $(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
|
4757 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4758 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4759 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4760 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4761 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4762 3 |
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 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4765 return true; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4766 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4767 }, options||{})); |
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 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4770 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4771 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4772 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4773 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4774 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4775 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4776 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4777 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4778 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4779 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4780 $(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
|
4781 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4782 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4783 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4784 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4785 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4786 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4787 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4788 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4789 return true; |
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 }, options||{})); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4792 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4793 JSEND |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4796 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4797 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
|
4798 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4799 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4800 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4801 func Test_cindent_53() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4802 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4803 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
|
4804 setl cino=j1,J1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4805 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4806 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4807 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4808 (function($){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4809 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4810 $(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
|
4811 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4812 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4813 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4814 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4815 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4816 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4817 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4818 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4819 return true; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4820 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4821 }, options||{})); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4822 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4823 })(jQuery); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4824 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4825 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4826 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4827 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4828 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4829 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4830 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4831 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4832 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4833 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4834 (function($){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4835 function init(options) { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4836 $(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
|
4837 foo: 'bar', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4838 bar: 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4839 foobar: [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4840 1, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4841 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4842 3 |
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 callback: function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4845 return true; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4846 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4847 }, options||{})); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4848 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4849 })(jQuery); |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4850 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4851 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4852 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4853 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4854 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
|
4855 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4856 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4857 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4858 func Test_cindent_54() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4859 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4860 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
|
4861 setl cino=j1,J1,+2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4862 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4863 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4864 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4865 // Results of JavaScript indent |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4866 // 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4867 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4868 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4869 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4870 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4871 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4872 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4873 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4874 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4875 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4876 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4877 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4878 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4879 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4880 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4881 // 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4882 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4883 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4884 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4885 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4886 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4887 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4888 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4889 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4890 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4891 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4892 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4893 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4894 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4895 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4896 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4897 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4898 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4899 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4900 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4901 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4902 // 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4903 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4904 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4905 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4906 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4907 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4908 /* comment 2 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4909 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4910 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4911 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4912 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4913 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4914 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4915 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4916 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4917 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4918 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4919 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4920 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4921 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4922 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4923 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4924 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4925 // 4 |
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 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4928 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4929 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4930 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4931 var b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4932 var c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4933 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4934 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4935 // 5 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4936 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4937 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4938 [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4939 0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4940 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4941 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4942 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4943 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4944 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4945 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4946 // 6 |
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 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4949 [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4950 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4951 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4952 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4953 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4954 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4955 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4956 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4957 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4958 // 7 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4959 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4960 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4961 // [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4962 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4963 // 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4964 // ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4965 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4966 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4967 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4968 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4969 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4970 // 8 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4971 var x = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4972 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4973 var a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4974 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4975 c, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4976 d, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4977 e, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4978 f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4979 g, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4980 h, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4981 i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4982 }) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4983 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4984 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4985 // 9 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4986 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4987 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4988 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4989 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4990 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4991 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4992 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4993 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4994 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4995 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4996 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4997 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4998 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
4999 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5000 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5001 'i' |
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 // 10 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5005 var a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5006 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5007 c, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5008 d, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5009 e, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5010 f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5011 g, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5012 h, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5013 i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5014 JSEND |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5015 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5018 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5019 call search('^JSSTART') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5020 exe "normal =/^JSEND\n" |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5021 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5022 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5023 JSSTART |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5024 // Results of JavaScript indent |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5025 // 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5026 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5027 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5028 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5029 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5030 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5031 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5032 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5033 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5034 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5035 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5036 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5037 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5038 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5039 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5040 // 2 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5041 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5042 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5043 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5044 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5045 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5046 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5047 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5048 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5049 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5050 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5051 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5052 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5053 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5054 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5055 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5056 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5057 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5058 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5059 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5060 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5061 // 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5062 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5063 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5064 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5065 // comment 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5066 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5067 /* comment 2 */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5068 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5069 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5070 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5071 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5072 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5073 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5074 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5075 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5076 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5077 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5078 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5079 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5080 'i' |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5081 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5082 }()) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5083 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5084 // 4 |
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 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5087 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5088 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5089 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5090 var b; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5091 var c; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5092 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5093 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5094 // 5 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5095 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5096 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5097 [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5098 0 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5099 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5100 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5101 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5102 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5103 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5104 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5105 // 6 |
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 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5108 [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5109 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5110 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5111 ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5112 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5113 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5114 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5115 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5116 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5117 // 7 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5118 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5119 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5120 // [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5121 0, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5122 // 1 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5123 // ], |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5124 2, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5125 3 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5126 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5127 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5128 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5129 // 8 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5130 var x = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5131 (function(){ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5132 var a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5133 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5134 c, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5135 d, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5136 e, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5137 f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5138 g, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5139 h, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5140 i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5141 }) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5142 ]; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5143 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5144 // 9 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5145 var a = [ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5146 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5147 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5148 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5149 'a', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5150 'b', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5151 0 + |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5152 5 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5153 9 * |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5154 'c', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5155 'd', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5156 'e', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5157 'f', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5158 'g', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5159 'h', |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5160 'i' |
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 // 10 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5164 var a, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5165 b, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5166 c, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5167 d, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5168 e, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5169 f, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5170 g, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5171 h, |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5172 i; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5173 JSEND |
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 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5176 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5177 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
|
5178 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5179 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5180 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5181 func Test_cindent_55() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5182 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5183 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
|
5184 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5185 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5186 let code =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5187 /* start of define */ |
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 #define AAA \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5191 BBB\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5192 CCC |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5193 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5194 #define CNT \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5195 1 + \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5196 2 + \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5197 4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5198 /* end of define */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5199 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5200 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5201 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5202 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5203 call search('start of define') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5204 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
|
5205 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5206 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5207 /* start of define */ |
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 #define AAA \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5211 BBB\ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5212 CCC |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5213 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5214 #define CNT \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5215 1 + \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5216 2 + \ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5217 4 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5218 /* end of define */ |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5219 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5220 [CODE] |
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 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
|
5223 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5224 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5225 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5226 func Test_cindent_56() |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5227 new |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5228 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
|
5229 setl cino& |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5230 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5231 let code =<< trim [CODE] |
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 a = second/*bug*/*line; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5234 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5235 [CODE] |
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 call append(0, code) |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5238 normal gg |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5239 call search('a = second') |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5240 normal ox |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5241 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5242 let expected =<< trim [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5243 { |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5244 a = second/*bug*/*line; |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5245 x |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5246 } |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5247 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5248 [CODE] |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5249 |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5250 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
|
5251 enew! | close |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5252 endfunc |
d615cc95089c
patch 8.1.1434: test 3 is old style
Bram Moolenaar <Bram@vim.org>
parents:
16720
diff
changeset
|
5253 |
11087
242e0617aa51
patch 8.0.0431: 'cinoptions' cannot set indent for extern block
Christian Brabandt <cb@256bit.org>
parents:
11069
diff
changeset
|
5254 " vim: shiftwidth=2 sts=2 expandtab |