diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2015-01-16 16:35:33 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-01-16 16:35:33 -0500 |
commit | bff48b23d700d6202e1c85564cd7fcb1b3ce4c34 (patch) | |
tree | 223916572a14eabc20dde3082b237231c7b99175 /test/unit/formatc.lua | |
parent | 401d738597a3e25319f988af49ec1cd7a5cb0980 (diff) | |
parent | 522a15f1c08c67824d52781ebdf284168678da96 (diff) | |
download | rneovim-bff48b23d700d6202e1c85564cd7fcb1b3ce4c34.tar.gz rneovim-bff48b23d700d6202e1c85564cd7fcb1b3ce4c34.tar.bz2 rneovim-bff48b23d700d6202e1c85564cd7fcb1b3ce4c34.zip |
Merge pull request #1833 from aktau/formatc-fix-gcc-on-osx
test: Correct lfs.attributes() call, and allow unit tests to run with gcc on OSX
Diffstat (limited to 'test/unit/formatc.lua')
-rw-r--r-- | test/unit/formatc.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unit/formatc.lua b/test/unit/formatc.lua index 792894f349..f9397eaec6 100644 --- a/test/unit/formatc.lua +++ b/test/unit/formatc.lua @@ -149,8 +149,7 @@ local C_keywords = set { -- }; -- -- would become: --- struct mystruct --- { int a; int b; }; +-- struct mystruct { int a; int b; }; -- -- The first one will have a lot of false positives (the line '{' for -- example), the second one is more unique. @@ -179,7 +178,8 @@ local function formatc(str) -- static and/or inline usually indicate an inline header function, -- which has no trailing ';', so we have to add a newline after the -- '}' ourselves. - if token[1] == 'static' or token[1] == 'inline' then + local tok = token[1] + if tok == 'static' or tok == 'inline' or tok == '__inline' then end_at_brace = true end elseif typ == 'preprocessor' then |