aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/003_cindent_spec.lua
diff options
context:
space:
mode:
authorwatiko <service@mail.watiko.net>2016-02-15 18:28:39 +0900
committerwatiko <service@mail.watiko.net>2016-02-15 19:02:52 +0900
commit2d5cba630c13d45e8a0125fe87a7c85b878c0b6f (patch)
treeb5c16a1aa00a03199b45834e9649cf95faeb07f2 /test/functional/legacy/003_cindent_spec.lua
parent7609a96a35224be3d7f3ba77691f9115e0281b4e (diff)
downloadrneovim-2d5cba630c13d45e8a0125fe87a7c85b878c0b6f.tar.gz
rneovim-2d5cba630c13d45e8a0125fe87a7c85b878c0b6f.tar.bz2
rneovim-2d5cba630c13d45e8a0125fe87a7c85b878c0b6f.zip
vim-patch:7.4.891
Problem: Indentation of array initializer is wrong. Solution: Avoid that calling find_start_rawstring() changes the position returned by find_start_comment(), add a test. (Hirohito Higashi) https://github.com/vim/vim/commit/089af18d1fd0961ff504ee72db0156bbfe509cdf
Diffstat (limited to 'test/functional/legacy/003_cindent_spec.lua')
-rw-r--r--test/functional/legacy/003_cindent_spec.lua44
1 files changed, 44 insertions, 0 deletions
diff --git a/test/functional/legacy/003_cindent_spec.lua b/test/functional/legacy/003_cindent_spec.lua
index 19694550f4..fbbc05f486 100644
--- a/test/functional/legacy/003_cindent_spec.lua
+++ b/test/functional/legacy/003_cindent_spec.lua
@@ -919,6 +919,28 @@ describe('cindent', function()
)foo";
}
+ {
+ int a[4] = {
+ [0] = 0,
+ [1] = 1,
+ [2] = 2,
+ [3] = 3,
+ };
+ }
+
+ {
+ a = b[2]
+ + 3;
+ }
+
+ {
+ if (1)
+ /* aaaaa
+ * bbbbb
+ */
+ a = 1;
+ }
+
/* end of AUTO */
]=])
@@ -1825,6 +1847,28 @@ describe('cindent', function()
)foo";
}
+ {
+ int a[4] = {
+ [0] = 0,
+ [1] = 1,
+ [2] = 2,
+ [3] = 3,
+ };
+ }
+
+ {
+ a = b[2]
+ + 3;
+ }
+
+ {
+ if (1)
+ /* aaaaa
+ * bbbbb
+ */
+ a = 1;
+ }
+
/* end of AUTO */
]=])
end)