aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorTom Praschan <13141438+tom-anders@users.noreply.github.com>2022-04-07 16:14:02 +0200
committerTom Praschan <13141438+tom-anders@users.noreply.github.com>2022-04-09 15:39:46 +0200
commit45f62464d3e1f39e74fca627e27eea106ffe46ef (patch)
tree3ff4fdbd476d29c6427de9b3b02a63c0eb43b13a /src/nvim/testdir
parent233014f92b5d4d5bf8a6f019241aafd1b05dd383 (diff)
downloadrneovim-45f62464d3e1f39e74fca627e27eea106ffe46ef.tar.gz
rneovim-45f62464d3e1f39e74fca627e27eea106ffe46ef.tar.bz2
rneovim-45f62464d3e1f39e74fca627e27eea106ffe46ef.zip
vim-patch:8.2.4702: C++ scope labels are hard-coded
Problem: C++ scope labels are hard-coded. Solution: Add 'cinscopedecls' to define the labels. (Tom Praschan, closes vim/vim#10109) https://github.com/vim/vim/commit/3506cf34c17c5eae6c2d1317db1fcd5a8493c288
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_cindent.vim43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cindent.vim b/src/nvim/testdir/test_cindent.vim
index 4b702bf2b8..4d69aed96c 100644
--- a/src/nvim/testdir/test_cindent.vim
+++ b/src/nvim/testdir/test_cindent.vim
@@ -5311,6 +5311,49 @@ func Test_cindent_case()
bwipe!
endfunc
+func Test_cindent_scopedecls()
+ new
+ setl cindent ts=4 sw=4
+ setl cino=g0
+ setl cinsd+=public\ slots,signals
+
+ let code =<< trim [CODE]
+ class Foo
+ {
+ public:
+ virtual void foo() = 0;
+ public slots:
+ void onBar();
+ signals:
+ void baz();
+ private:
+ int x;
+ };
+ [CODE]
+
+ call append(0, code)
+ normal gg
+ normal ]]=][
+
+ let expected =<< trim [CODE]
+ class Foo
+ {
+ public:
+ virtual void foo() = 0;
+ public slots:
+ void onBar();
+ signals:
+ void baz();
+ private:
+ int x;
+ };
+
+ [CODE]
+
+ call assert_equal(expected, getline(1, '$'))
+ enew! | close
+endfunc
+
func Test_cindent_pragma()
new
setl cindent ts=4 sw=4