aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_cindent.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir/test_cindent.vim')
-rw-r--r--src/nvim/testdir/test_cindent.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cindent.vim b/src/nvim/testdir/test_cindent.vim
index b6c2d1467e..562867f548 100644
--- a/src/nvim/testdir/test_cindent.vim
+++ b/src/nvim/testdir/test_cindent.vim
@@ -118,6 +118,16 @@ b = something();
bw!
endfunc
+func Test_cindent_func()
+ new
+ setlocal cindent
+ call setline(1, ['int main(void)', '{', 'return 0;', '}'])
+ call assert_equal(-1, cindent(0))
+ call assert_equal(&sw, 3->cindent())
+ call assert_equal(-1, cindent(line('$')+1))
+ bwipe!
+endfunc
+
" this was going beyond the end of the line.
func Test_cindent_case()
new