aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2021-12-23 07:41:23 +0800
committerzeertzjq <zeertzjq@outlook.com>2021-12-23 07:41:23 +0800
commitb8d6ab04a221b55ae240a85a0aba0b6a8b261fb4 (patch)
treec9cde44788c42d596b2b87ca838c9db7f6e539dd
parente3f615b205c8675b209e609d6426e2b138ceab7a (diff)
downloadrneovim-b8d6ab04a221b55ae240a85a0aba0b6a8b261fb4.tar.gz
rneovim-b8d6ab04a221b55ae240a85a0aba0b6a8b261fb4.tar.bz2
rneovim-b8d6ab04a221b55ae240a85a0aba0b6a8b261fb4.zip
vim-patch:8.1.1585: :let-heredoc does not trim enough
Problem: :let-heredoc does not trim enough. Solution: Trim indent from the contents based on the indent of the first line. Use let-heredoc in more tests. https://github.com/vim/vim/commit/e7eb92708ec2092a2fc11e78703b5dcf83844412 This is a missing part of Vim patch 8.1.1585 from #11211.
-rw-r--r--src/nvim/testdir/test_cindent.vim58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/nvim/testdir/test_cindent.vim b/src/nvim/testdir/test_cindent.vim
index 8a575c7cd8..bd556387c6 100644
--- a/src/nvim/testdir/test_cindent.vim
+++ b/src/nvim/testdir/test_cindent.vim
@@ -2069,14 +2069,14 @@ func Test_cindent_2()
let &wm = &columns - 20
let code =<< trim [CODE]
- {
-
- /* this is
- * a real serious important big
- * comment
- */
- /* insert " about life, the universe, and the rest" after "serious" */
- }
+ {
+
+ /* this is
+ * a real serious important big
+ * comment
+ */
+ /* insert " about life, the universe, and the rest" after "serious" */
+ }
[CODE]
call append(0, code)
@@ -3243,32 +3243,32 @@ func Test_cindent_30()
setl cindent ts=4 sw=4
setl cino=+20
- let code =<< trim [CODE]
- void
- foo()
- {
- if (a)
- {
- } else
- asdf;
- }
- [CODE]
+ let code =<< [CODE]
+ void
+foo()
+{
+ if (a)
+ {
+ } else
+ asdf;
+}
+[CODE]
call append(0, code)
normal gg
normal ]]=][
- let expected =<< trim [CODE]
- void
- foo()
- {
- if (a)
- {
- } else
- asdf;
- }
+ let expected =<< [CODE]
+ void
+foo()
+{
+ if (a)
+ {
+ } else
+ asdf;
+}
- [CODE]
+[CODE]
call assert_equal(expected, getline(1, '$'))
enew! | close
@@ -3461,7 +3461,7 @@ func Test_cindent_34()
normal =][
let expected =<< trim [CODE]
-
+
void
func(int a
#if defined(FOO)