diff options
author | Michael Jeanson <mjeanson@gmail.com> | 2021-07-04 08:27:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-04 21:27:55 +0900 |
commit | 9efa96eb9431e43e183a73f91db4c84126880a15 (patch) | |
tree | 9488352b9d2700d46c1b5347237af769c77cc065 /test | |
parent | f9332bae1fc9f2599847e4641b27527df415507b (diff) | |
download | ale-9efa96eb9431e43e183a73f91db4c84126880a15.zip |
fix: cflags parser: no absolute path for '-include' (#3775)
Both '-include' and '-imacros' take a file as an argument that will then
be searched in the include path like a regular '#include "..."'
statement in a source file. As such, they should not have their path
converted to an absolute path.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/test_c_flag_parsing.vader | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/test_c_flag_parsing.vader b/test/test_c_flag_parsing.vader index 4204d8ea..c661651e 100644 --- a/test/test_c_flag_parsing.vader +++ b/test/test_c_flag_parsing.vader @@ -495,8 +495,8 @@ Execute(We should include several important flags): \ . ' -isystem ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incsystem')) \ . ' -idirafter ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/incafter')) \ . ' -iframework ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incframework')) - \ . ' -include ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/foo bar')) - \ . ' -imacros ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incmacros')) + \ . ' -include file.h' + \ . ' -imacros macros.h' \ . ' -Dmacro="value"' \ . ' -DGoal=9' \ . ' -D macro2' @@ -525,9 +525,9 @@ Execute(We should include several important flags): \ '-iframework', \ 'incframework', \ '-include', - \ '''foo bar''', + \ 'file.h', \ '-imacros', - \ 'incmacros', + \ 'macros.h', \ '-Dmacro="value"', \ '-DGoal=9', \ '-D', @@ -575,8 +575,8 @@ Execute(We should quote the flags we need to quote): \ . ' -isystem ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incsystem')) \ . ' -idirafter ' . ale#Escape(ale#path#Simplify(g:dir. '/test-files/c/makefile_project/incafter')) \ . ' -iframework ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incframework')) - \ . ' -include ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/foo bar')) - \ . ' -imacros ' . ale#Escape(ale#path#Simplify(g:dir . '/test-files/c/makefile_project/incmacros')) + \ . ' -include file.h' + \ . ' -imacros macros.h' \ . ' ' . ale#Escape('-Dmacro="value"') \ . ' -DGoal=9' \ . ' -D macro2' @@ -608,9 +608,9 @@ Execute(We should quote the flags we need to quote): \ '-iframework', \ 'incframework', \ '-include', - \ '''foo bar''', + \ 'file.h', \ '-imacros', - \ 'incmacros', + \ 'macros.h', \ '-Dmacro="value"', \ '-DGoal=9', \ '-D', |