summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/fixers/test_astyle_fixer_callback.vader13
-rw-r--r--test/test_cpp_project/dummy.cpp0
2 files changed, 13 insertions, 0 deletions
diff --git a/test/fixers/test_astyle_fixer_callback.vader b/test/fixers/test_astyle_fixer_callback.vader
index 1cd6b394..086d283c 100644
--- a/test/fixers/test_astyle_fixer_callback.vader
+++ b/test/fixers/test_astyle_fixer_callback.vader
@@ -81,3 +81,16 @@ Execute(The astyle callback should find nearest default option file _astylrc):
\ . ' --stdin=' . ale#Escape(targetfile)
\ },
\ ale#fixers#astyle#Fix(bufnr(''))
+
+Execute(The astyle callback should find .astylrc in the same directory as src):
+ call ale#test#SetFilename('../test_cpp_project/dummy.cpp')
+ set filetype=cpp " The test fails without this
+ let targetfile = bufname(bufnr('%'))
+
+ AssertEqual
+ \ {
+ \ 'command': ale#Escape('invalidpp')
+ \ . ' --project=.astylerc'
+ \ . ' --stdin=' . ale#Escape(targetfile)
+ \ },
+ \ ale#fixers#astyle#Fix(bufnr(''))
diff --git a/test/test_cpp_project/dummy.cpp b/test/test_cpp_project/dummy.cpp
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/test_cpp_project/dummy.cpp