summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_cindent.vim
diff options
context:
space:
mode:
authorTom Praschan <13141438+tom-anders@users.noreply.github.com>2022-04-07 12:39:08 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-07 12:39:08 +0100
commit3506cf34c17c5eae6c2d1317db1fcd5a8493c288 (patch)
tree7a93cd7c69e55b1ee9e170d8efb62e75f67087fd /src/testdir/test_cindent.vim
parent3ad2090316edc85e93094bba7af64f9991cc7f85 (diff)
patch 8.2.4702: C++ scope labels are hard-codedv8.2.4702
Problem: C++ scope labels are hard-coded. Solution: Add 'cinscopedecls' to define the labels. (Rom Praschan, closes #10109)
Diffstat (limited to 'src/testdir/test_cindent.vim')
-rw-r--r--src/testdir/test_cindent.vim43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/testdir/test_cindent.vim b/src/testdir/test_cindent.vim
index d8ea4e772e..dbd4aa006e 100644
--- a/src/testdir/test_cindent.vim
+++ b/src/testdir/test_cindent.vim
@@ -5319,6 +5319,49 @@ func Test_cindent_change_multline()
close!
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