diff options
author | w0rp <devw0rp@gmail.com> | 2021-03-01 20:11:10 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2021-03-01 20:11:10 +0000 |
commit | 9fe7b1fe6a23fb55e6d782293585d58193123f59 (patch) | |
tree | 0403deb70011aee7be08e586b10b5828cf69499e /test/test_maven_build_classpath_command.vader | |
parent | 48fab99a0ab793e1b9607795c21659f12bd6947f (diff) | |
download | ale-9fe7b1fe6a23fb55e6d782293585d58193123f59.zip |
Close #2281 - Separate cwd commands from commands
Working directories are now set seperately from the commands so they
can later be swapped out when running linters over projects is
supported, and also better support filename mapping for running linters
on other machines in future.
Diffstat (limited to 'test/test_maven_build_classpath_command.vader')
-rw-r--r-- | test/test_maven_build_classpath_command.vader | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/test/test_maven_build_classpath_command.vader b/test/test_maven_build_classpath_command.vader index 2d8b38a5..633bb2a1 100644 --- a/test/test_maven_build_classpath_command.vader +++ b/test/test_maven_build_classpath_command.vader @@ -25,9 +25,11 @@ Execute(Should use 'mvnw' in classpath command if available): call ale#test#SetFilename('maven-test-files/maven-java-project/module1/src/main/java/dummy1.java') AssertEqual - \ ale#path#CdString(ale#path#Simplify(g:dir . '/maven-test-files/maven-java-project/module1')) - \ . ale#path#Simplify(g:dir . '/maven-test-files/maven-java-project/module1/' . g:expected_wrapper) - \ . ' dependency:build-classpath', + \ [ + \ ale#path#Simplify(g:dir . '/maven-test-files/maven-java-project/module1'), + \ ale#Escape(ale#path#Simplify(g:dir . '/maven-test-files/maven-java-project/module1/' . g:expected_wrapper)) + \ . ' dependency:build-classpath', + \ ], \ ale#maven#BuildClasspathCommand(bufnr('')) Execute(Should use 'mvn' in classpath command if it is executable and 'mvnw' is unavailable): @@ -36,13 +38,16 @@ Execute(Should use 'mvn' in classpath command if it is executable and 'mvnw' is \ . ale#path#Simplify(g:dir . '/maven-test-files') AssertEqual - \ ale#path#CdString(ale#path#Simplify(g:dir . '/maven-test-files/maven-java-project/module2')) - \ . 'mvn dependency:build-classpath', + \ [ + \ ale#path#Simplify(g:dir . '/maven-test-files/maven-java-project/module2'), + \ ale#Escape('mvn') + \ . ' dependency:build-classpath', + \ ], \ ale#maven#BuildClasspathCommand(bufnr('')) Execute(Should return empty string if maven cannot be executed): call ale#test#SetFilename('maven-test-files/non-maven-project/src/main/java/dummy.java') AssertEqual - \ '', + \ ['', ''], \ ale#maven#BuildClasspathCommand(bufnr('')) |