summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/command_callback/checkstyle_paths/google_checks.xml0
-rw-r--r--test/command_callback/test_checkstyle_command_callback.vader20
-rw-r--r--test/fixers/test_prettier_fixer_callback.vader14
-rw-r--r--test/python/test_deoplete_source.py2
4 files changed, 30 insertions, 6 deletions
diff --git a/test/command_callback/checkstyle_paths/google_checks.xml b/test/command_callback/checkstyle_paths/google_checks.xml
deleted file mode 100644
index e69de29b..00000000
--- a/test/command_callback/checkstyle_paths/google_checks.xml
+++ /dev/null
diff --git a/test/command_callback/test_checkstyle_command_callback.vader b/test/command_callback/test_checkstyle_command_callback.vader
index d775f9f2..7a9f26b3 100644
--- a/test/command_callback/test_checkstyle_command_callback.vader
+++ b/test/command_callback/test_checkstyle_command_callback.vader
@@ -6,17 +6,27 @@ After:
call ale#assert#TearDownLinterTest()
Execute(The checkstyle callback should return the correct default value):
- AssertLinter 'checkstyle', ale#Escape('checkstyle') . ' %s'
+ AssertLinter 'checkstyle',
+ \ ale#Escape('checkstyle')
+ \ . ' -c ' . ale#Escape('/google_checks.xml')
+ \ . ' %s'
Execute(The checkstyle executable should be configurable):
let b:ale_java_checkstyle_executable = 'foobar'
- AssertLinter 'foobar', ale#Escape('foobar') . ' %s'
+ AssertLinter 'foobar',
+ \ ale#Escape('foobar')
+ \ . ' -c ' . ale#Escape('/google_checks.xml')
+ \ . ' %s'
Execute(Custom options should be supported):
let b:ale_java_checkstyle_options = '--foobar'
- AssertLinter 'checkstyle', ale#Escape('checkstyle') . ' --foobar %s'
+ AssertLinter 'checkstyle',
+ \ ale#Escape('checkstyle')
+ \ . ' --foobar'
+ \ . ' -c ' . ale#Escape('/google_checks.xml')
+ \ . ' %s'
Execute(configuration files set in _config should be supported):
let b:ale_java_checkstyle_config = ale#path#Simplify(g:dir . '/checkstyle_paths/other_config.xml')
@@ -36,12 +46,12 @@ Execute(configuration files set in _options should be preferred over _config):
AssertLinter 'checkstyle', ale#Escape('checkstyle') . ' -x -c /bar.xml %s'
-Execute(google_checks.xml should be detected automatically):
+Execute(google_checks.xml should be used by default):
call ale#test#SetFilename('checkstyle_paths/test.java')
AssertLinter 'checkstyle',
\ ale#Escape('checkstyle')
- \ . ' -c ' . ale#Escape(ale#path#Simplify(g:dir . '/checkstyle_paths/google_checks.xml'))
+ \ . ' -c ' . ale#Escape('/google_checks.xml')
\ . ' %s'
Execute(Other relative paths should be supported):
diff --git a/test/fixers/test_prettier_fixer_callback.vader b/test/fixers/test_prettier_fixer_callback.vader
index 9be161ac..062ae8cf 100644
--- a/test/fixers/test_prettier_fixer_callback.vader
+++ b/test/fixers/test_prettier_fixer_callback.vader
@@ -280,6 +280,20 @@ Execute(Should set --parser based on first filetype of multiple filetypes):
\ . ' --stdin-filepath %s --stdin',
\ }
+Execute(Should set --parser for experimental language, Handlebars):
+ call ale#test#SetFilename('../prettier-test-files/testfile.hbs')
+
+ set filetype=html.handlebars
+
+ GivenCommandOutput ['1.6.0']
+ AssertFixer
+ \ {
+ \ 'command': ale#path#CdString(expand('%:p:h'))
+ \ . ale#Escape(g:ale_javascript_prettier_executable)
+ \ . ' --parser glimmer'
+ \ . ' --stdin-filepath %s --stdin',
+ \ }
+
Execute(The prettier_d post-processor should permit regular JavaScript content):
AssertEqual
\ [
diff --git a/test/python/test_deoplete_source.py b/test/python/test_deoplete_source.py
index 28eec5cd..1462f77d 100644
--- a/test/python/test_deoplete_source.py
+++ b/test/python/test_deoplete_source.py
@@ -45,7 +45,7 @@ class DeopleteSourceTest(unittest.TestCase):
'mark': '[L]',
'min_pattern_length': 1,
'name': 'ale',
- 'rank': 100,
+ 'rank': 1000,
})
def test_completion_position(self):