Mercurial > vim
comparison src/testdir/test_smartindent.vim @ 15406:63b02fcf1361 v8.1.0711
patch 8.1.0711: test files still use function!
commit https://github.com/vim/vim/commit/1e1153600c0377472d62cc553173fe555ddcf5a7
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 9 23:01:02 2019 +0100
patch 8.1.0711: test files still use function!
Problem: Test files still use function!.
Solution: Remove the exclamation mark. Fix overwriting a function.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 09 Jan 2019 23:15:05 +0100 |
parents | 268b1036cd17 |
children | 6d3c683466f4 |
comparison
equal
deleted
inserted
replaced
15405:3a8785d45112 | 15406:63b02fcf1361 |
---|---|
1 " Tests for smartindent | 1 " Tests for smartindent |
2 | 2 |
3 " Tests for not doing smart indenting when it isn't set. | 3 " Tests for not doing smart indenting when it isn't set. |
4 function! Test_nosmartindent() | 4 func Test_nosmartindent() |
5 new | 5 new |
6 call append(0, [" some test text", | 6 call append(0, [" some test text", |
7 \ " test text", | 7 \ " test text", |
8 \ "test text", | 8 \ "test text", |
9 \ " test text"]) | 9 \ " test text"]) |
10 set nocindent nosmartindent autoindent | 10 set nocindent nosmartindent autoindent |
11 exe "normal! gg/some\<CR>" | 11 exe "normal! gg/some\<CR>" |
12 exe "normal! 2cc#test\<Esc>" | 12 exe "normal! 2cc#test\<Esc>" |
13 call assert_equal(" #test", getline(1)) | 13 call assert_equal(" #test", getline(1)) |
14 enew! | close | 14 enew! | close |
15 endfunction | 15 endfunc |
16 | 16 |
17 function MyIndent() | 17 func MyIndent() |
18 endfunction | 18 endfunc |
19 | 19 |
20 " When 'indentexpr' is set, setting 'si' has no effect. | 20 " When 'indentexpr' is set, setting 'si' has no effect. |
21 function Test_smartindent_has_no_effect() | 21 func Test_smartindent_has_no_effect() |
22 new | 22 new |
23 exe "normal! i\<Tab>one\<Esc>" | 23 exe "normal! i\<Tab>one\<Esc>" |
24 set noautoindent | 24 set noautoindent |
25 set smartindent | 25 set smartindent |
26 set indentexpr= | 26 set indentexpr= |
34 delfunction! MyIndent | 34 delfunction! MyIndent |
35 set autoindent& | 35 set autoindent& |
36 set smartindent& | 36 set smartindent& |
37 set indentexpr& | 37 set indentexpr& |
38 bwipe! | 38 bwipe! |
39 endfunction | 39 endfunc |
40 | 40 |
41 " vim: shiftwidth=2 sts=2 expandtab | 41 " vim: shiftwidth=2 sts=2 expandtab |