aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2018-08-23 10:45:58 -0400
committerGitHub <noreply@github.com>2018-08-23 10:45:58 -0400
commitdfbb75fdabe3829abd0a1f0f905adc7dc5740d15 (patch)
treefb3644fcd5566cac85a186513e0ba451505c1f36 /src/nvim/testdir
parent012cd35bfbe2c175a31a2fba14cf1bdee6f06e8c (diff)
parent6c8851be4e5ce8cbd6f224451fae8a0adc292bf6 (diff)
downloadrneovim-dfbb75fdabe3829abd0a1f0f905adc7dc5740d15.tar.gz
rneovim-dfbb75fdabe3829abd0a1f0f905adc7dc5740d15.tar.bz2
rneovim-dfbb75fdabe3829abd0a1f0f905adc7dc5740d15.zip
Merge pull request #8889 from janlazo/vim-8.0.0999
[RDY] vim-patch:8.0.{999,1041,1043,1044}
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_cindent.vim31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_cindent.vim b/src/nvim/testdir/test_cindent.vim
index 444c4c4109..7c2c5e341c 100644
--- a/src/nvim/testdir/test_cindent.vim
+++ b/src/nvim/testdir/test_cindent.vim
@@ -68,9 +68,38 @@ func Test_cino_extern_c()
call assert_equal(pair[2], getline(len(lines) + 1), 'Failed for "' . string(lines) . '"')
endfor
+ bwipe!
+endfunc
+func Test_cindent_rawstring()
+ new
+ setl cindent
+ call feedkeys("i" .
+ \ "int main() {\<CR>" .
+ \ "R\"(\<CR>" .
+ \ ")\";\<CR>" .
+ \ "statement;\<Esc>", "x")
+ call assert_equal("\tstatement;", getline(line('.')))
+ bw!
+endfunc
- bwipe!
+func Test_cindent_expr()
+ new
+ func! MyIndentFunction()
+ return v:lnum == 1 ? shiftwidth() : 0
+ endfunc
+ setl expandtab sw=8 indentkeys+=; indentexpr=MyIndentFunction()
+ call setline(1, ['var_a = something()', 'b = something()'])
+ call cursor(1, 1)
+ call feedkeys("^\<c-v>j$A;\<esc>", 'tnix')
+ call assert_equal([' var_a = something();', 'b = something();'], getline(1, '$'))
+
+ %d
+ call setline(1, [' var_a = something()', ' b = something()'])
+ call cursor(1, 1)
+ call feedkeys("^\<c-v>j$A;\<esc>", 'tnix')
+ call assert_equal([' var_a = something();', ' b = something()'], getline(1, '$'))
+ bw!
endfunc
" vim: shiftwidth=2 sts=2 expandtab