aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/003_cindent_spec.lua
diff options
context:
space:
mode:
authorwatiko <service@mail.watiko.net>2016-02-15 19:12:47 +0900
committerwatiko <service@mail.watiko.net>2016-02-15 19:13:15 +0900
commit72d5a88af5f417a8312408d85dbb6949f64146b2 (patch)
tree02059e9045058cb8bfcaead69ab75272a221ec75 /test/functional/legacy/003_cindent_spec.lua
parent2d5cba630c13d45e8a0125fe87a7c85b878c0b6f (diff)
downloadrneovim-72d5a88af5f417a8312408d85dbb6949f64146b2.tar.gz
rneovim-72d5a88af5f417a8312408d85dbb6949f64146b2.tar.bz2
rneovim-72d5a88af5f417a8312408d85dbb6949f64146b2.zip
vim-patch:7.4.893
Problem: C indenting is wrong below a "case (foo):" because it is recognized as a C++ base class construct. Issue #38. Solution: Check for the case keyword. https://github.com/vim/vim/commit/d1b15dec4d00d7ed5e92ff4e0fb7fc2e0818e479
Diffstat (limited to 'test/functional/legacy/003_cindent_spec.lua')
-rw-r--r--test/functional/legacy/003_cindent_spec.lua54
1 files changed, 54 insertions, 0 deletions
diff --git a/test/functional/legacy/003_cindent_spec.lua b/test/functional/legacy/003_cindent_spec.lua
index fbbc05f486..9831c7a7d8 100644
--- a/test/functional/legacy/003_cindent_spec.lua
+++ b/test/functional/legacy/003_cindent_spec.lua
@@ -941,6 +941,33 @@ describe('cindent', function()
a = 1;
}
+ void func()
+ {
+ switch (foo)
+ {
+ case (bar):
+ if (baz())
+ quux();
+ break;
+ case (shmoo):
+ if (!bar)
+ {
+ }
+ case (foo1):
+ switch (bar)
+ {
+ case baz:
+ baz_f();
+ break;
+ }
+ break;
+ default:
+ baz();
+ baz();
+ break;
+ }
+ }
+
/* end of AUTO */
]=])
@@ -1869,6 +1896,33 @@ describe('cindent', function()
a = 1;
}
+ void func()
+ {
+ switch (foo)
+ {
+ case (bar):
+ if (baz())
+ quux();
+ break;
+ case (shmoo):
+ if (!bar)
+ {
+ }
+ case (foo1):
+ switch (bar)
+ {
+ case baz:
+ baz_f();
+ break;
+ }
+ break;
+ default:
+ baz();
+ baz();
+ break;
+ }
+ }
+
/* end of AUTO */
]=])
end)