aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2018-12-09 21:11:56 -0500
committerJustin M. Keyes <justinkz@gmail.com>2018-12-10 03:11:56 +0100
commit55c5185884d707e6c59d1900a4d921038f360807 (patch)
treebfdefcfe94a551c2e3a5d3e92256c31008e57da6 /src/nvim/testdir
parent20620bae76deddd892df2d33f9e745efd5d8598b (diff)
downloadrneovim-55c5185884d707e6c59d1900a4d921038f360807.tar.gz
rneovim-55c5185884d707e6c59d1900a4d921038f360807.tar.bz2
rneovim-55c5185884d707e6c59d1900a4d921038f360807.zip
vim-patch:8.1.0574: 'commentstring', fold marker in C (#9339)
Problem: 'commentstring' not used when adding fold marker in C. Solution: Require white space before middle comment part. (mostly by Hirohito Higashi) https://github.com/vim/vim/commit/4af7259b2b35e85c590d54908fcd248d2c733be8
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_fold.vim29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim
index 85f58ada7e..0b4b5d1922 100644
--- a/src/nvim/testdir/test_fold.vim
+++ b/src/nvim/testdir/test_fold.vim
@@ -514,6 +514,35 @@ func Test_fold_marker()
enew!
endfunc
+" test create fold markers with C filetype
+func Test_fold_create_marker_in_C()
+ enew!
+ set fdm=marker fdl=9
+ set filetype=c
+
+ let content = [
+ \ '/*',
+ \ ' * comment',
+ \ ' * ',
+ \ ' *',
+ \ ' */',
+ \ 'int f(int* p) {',
+ \ ' *p = 3;',
+ \ ' return 0;',
+ \ '}'
+ \]
+ for c in range(len(content) - 1)
+ bw!
+ call append(0, content)
+ call cursor(c + 1, 1)
+ norm! zfG
+ call assert_equal(content[c] . (c < 4 ? '{{{' : '/*{{{*/'), getline(c + 1))
+ endfor
+
+ set fdm& fdl&
+ enew!
+endfunc
+
" test folding with indent
func Test_fold_indent()
enew!