summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fixers/test_astyle_fixer_callback.vader11
-rw-r--r--test/test_c_projects/makefile_project/_astylerc0
2 files changed, 11 insertions, 0 deletions
diff --git a/test/fixers/test_astyle_fixer_callback.vader b/test/fixers/test_astyle_fixer_callback.vader
index 60a18213..cbec4493 100644
--- a/test/fixers/test_astyle_fixer_callback.vader
+++ b/test/fixers/test_astyle_fixer_callback.vader
@@ -65,3 +65,14 @@ Execute(The astyle callback should return the correct default values with an opt
\ . ' --stdin='
\ },
\ ale#fixers#astyle#Fix(bufnr(''))
+
+Execute(The astyle callback should find nearest default option file _astylrc):
+ call ale#test#SetFilename('../test_c_projects/makefile_project/subdir/file.c')
+
+ AssertEqual
+ \ {
+ \ 'command': ale#Escape('xxxinvalid')
+ \ . ' --project=_astylerc'
+ \ . ' --stdin='
+ \ },
+ \ ale#fixers#astyle#Fix(bufnr(''))
diff --git a/test/test_c_projects/makefile_project/_astylerc b/test/test_c_projects/makefile_project/_astylerc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/test_c_projects/makefile_project/_astylerc