diff options
author | w0rp <w0rp@users.noreply.github.com> | 2019-03-06 10:39:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-06 10:39:32 +0000 |
commit | 6aef52f026117e49869080698e0e303d95e83a9a (patch) | |
tree | 708e7192c3ff522fe08f37d5d8351e84e4c34def /test | |
parent | cf883aa5a8b9a8b6403732c4d094be6e65479ddd (diff) | |
parent | 4fc27f099bfe89be284f64838884d0357956420f (diff) | |
download | ale-6aef52f026117e49869080698e0e303d95e83a9a.zip |
Merge pull request #2305 from campbellr/master
javac: Don't assume src/main/java always exists
Diffstat (limited to 'test')
-rw-r--r-- | test/command_callback/java_paths_no_main/src/test/java/com/something/dummy | 0 | ||||
-rw-r--r-- | test/command_callback/test_javac_command_callback.vader | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/test/command_callback/java_paths_no_main/src/test/java/com/something/dummy b/test/command_callback/java_paths_no_main/src/test/java/com/something/dummy new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/command_callback/java_paths_no_main/src/test/java/com/something/dummy 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' |