summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_c_flag_parsing.vader12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_c_flag_parsing.vader b/test/test_c_flag_parsing.vader
index b09526a1..340f3ccf 100644
--- a/test/test_c_flag_parsing.vader
+++ b/test/test_c_flag_parsing.vader
@@ -167,6 +167,18 @@ Execute(ParseCompileCommandsFlags should parse some basic flags):
\ },
\ ] }, {})
+Execute(ParseCompileCommandsFlags should tolerate items without commands):
+ noautocmd execute 'file! ' . fnameescape(ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'))
+
+ AssertEqual
+ \ '',
+ \ ale#c#ParseCompileCommandsFlags(bufnr(''), { "xmms2-mpris.c": [
+ \ {
+ \ 'directory': '/foo/bar/xmms2-mpris',
+ \ 'file': '/foo/bar/xmms2-mpris/src/xmms2-mpris.c',
+ \ },
+ \ ] }, {})
+
Execute(ParseCompileCommandsFlags should fall back to files in the same directory):
noautocmd execute 'file! ' . fnameescape(ale#path#Simplify('/foo/bar/xmms2-mpris/src/xmms2-mpris.c'))