diff options
author | Ryan Campbell <campbellr@gmail.com> | 2018-12-20 15:37:31 -0700 |
---|---|---|
committer | Ryan Campbell <campbellr@gmail.com> | 2019-03-03 14:43:21 -0700 |
commit | 4fc27f099bfe89be284f64838884d0357956420f (patch) | |
tree | 6403ec0cc77de0b080a0ecce55c3da3403ed984b /test/command_callback/test_javac_command_callback.vader | |
parent | fefc093e707716da755ca2c326f852495f1b56fb (diff) | |
download | ale-4fc27f099bfe89be284f64838884d0357956420f.zip |
javac: Don't assume src/main/java always exists
Some projects I have only have src/test/java (no /src/main/java), which
seemed to break some incorrect assumptions the linter had.
Diffstat (limited to 'test/command_callback/test_javac_command_callback.vader')
-rw-r--r-- | test/command_callback/test_javac_command_callback.vader | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/command_callback/test_javac_command_callback.vader b/test/command_callback/test_javac_command_callback.vader index 2dcb6a1b..a7a928e4 100644 --- a/test/command_callback/test_javac_command_callback.vader +++ b/test/command_callback/test_javac_command_callback.vader @@ -166,3 +166,15 @@ Execute(The javac callback should include src/main/jaxb when available): \ ale#path#Simplify(g:dir . '/java_paths_with_jaxb/src/main/jaxb/'), \ ], g:cp_sep)) \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t' + +Execute(The javac callback should add -sourcepath even if src/java/main doesn't exist): + call ale#engine#Cleanup(bufnr('')) + call ale#test#SetFilename('java_paths_no_main/src/test/java/com/something/dummy.java') + call ale#engine#InitBufferInfo(bufnr('')) + + AssertLinter 'javac', + \ ale#path#CdString(expand('%:p:h')) . ale#Escape('javac') . ' -Xlint' + \ . ' -sourcepath ' . ale#Escape(join([ + \ ale#path#Simplify(g:dir . '/java_paths_no_main/src/test/java/'), + \ ], g:cp_sep)) + \ . ' -d ' . ale#Escape('TEMP_DIR') . ' %t' |