From 72d5a88af5f417a8312408d85dbb6949f64146b2 Mon Sep 17 00:00:00 2001 From: watiko Date: Mon, 15 Feb 2016 19:12:47 +0900 Subject: 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 --- test/functional/legacy/003_cindent_spec.lua | 54 +++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'test') 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) -- cgit