summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2020-08-19 00:15:34 +0100
committerGitHub <noreply@github.com>2020-08-19 00:15:34 +0100
commite27d4377b5dec30a6510a8d45685a37681baaaf0 (patch)
tree890b7d6441598f5cbd40341accf7910a9441493a /test
parentf8b3a43aab99af7abccde567c5912a12b9d4e0d9 (diff)
parentb20931571484108d1ec29eaab5b731e754649664 (diff)
downloadale-e27d4377b5dec30a6510a8d45685a37681baaaf0.zip
Merge pull request #3178 from sudobash1/expand_at
Fixes #3092 - Implement loading `@file` c arguments
Diffstat (limited to 'test')
-rw-r--r--test/test_c_flag_parsing.vader11
-rw-r--r--test/test_c_projects/makefile_project/args3
-rw-r--r--test/test_c_projects/makefile_project/subdir/args1
3 files changed, 15 insertions, 0 deletions
diff --git a/test/test_c_flag_parsing.vader b/test/test_c_flag_parsing.vader
index 8ae6f9dc..dff19aa3 100644
--- a/test/test_c_flag_parsing.vader
+++ b/test/test_c_flag_parsing.vader
@@ -366,3 +366,14 @@ Execute(CFlags we dont want to pass):
\ 'gcc -Wl,option -Wa,option -Wp,option filename.c somelib.a '
\ . '-fdump-file=name -fdiagnostics-arg -fno-show-column'
\ )
+
+Execute(Expanding @file in CFlags):
+ AssertEqual
+ \ '-DARGS1 -DARGS2 -O2',
+ \ ale#c#ParseCFlags(
+ \ ale#path#Simplify(g:dir. '/test_c_projects/makefile_project'),
+ \ 'gcc'
+ \ . ' -g'
+ \ . ' @./args'
+ \ . ' -O2',
+ \ )
diff --git a/test/test_c_projects/makefile_project/args b/test/test_c_projects/makefile_project/args
new file mode 100644
index 00000000..ccaf82ad
--- /dev/null
+++ b/test/test_c_projects/makefile_project/args
@@ -0,0 +1,3 @@
+foolib.a
+-DARGS1
+@subdir/args
diff --git a/test/test_c_projects/makefile_project/subdir/args b/test/test_c_projects/makefile_project/subdir/args
new file mode 100644
index 00000000..3fe9c3fe
--- /dev/null
+++ b/test/test_c_projects/makefile_project/subdir/args
@@ -0,0 +1 @@
+-DARGS2