diff options
Diffstat (limited to 'src/testdir/test_lispindent.vim')
-rw-r--r-- | src/testdir/test_lispindent.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_lispindent.vim b/src/testdir/test_lispindent.vim index 3c8660e0ab..770c50115e 100644 --- a/src/testdir/test_lispindent.vim +++ b/src/testdir/test_lispindent.vim @@ -97,8 +97,23 @@ func Test_lispindent_with_indentexpr() exe "normal a(x\<CR>1\<CR>2)\<Esc>" let expected = ['(x', ' 1', ' 2)'] call assert_equal(expected, getline(1, 3)) + " with Lisp indenting the first line is not indented normal 1G=G call assert_equal(expected, getline(1, 3)) + + %del + setl lispoptions=expr:1 indentexpr=5 + exe "normal a(x\<CR>1\<CR>2)\<Esc>" + let expected_expr = ['(x', ' 1', ' 2)'] + call assert_equal(expected_expr, getline(1, 3)) + normal 2G2<<=G + call assert_equal(expected_expr, getline(1, 3)) + + setl lispoptions=expr:0 + " with Lisp indenting the first line is not indented + normal 1G3<<=G + call assert_equal(expected, getline(1, 3)) + bwipe! endfunc |