summaryrefslogtreecommitdiff
path: root/test/linter
diff options
context:
space:
mode:
authorDavid Houston <houstdav000@gmail.com>2021-11-17 23:00:45 -0500
committerGitHub <noreply@github.com>2021-11-18 13:00:45 +0900
commit2cfeabd1b595805e506e7d79347e30e9a52084d1 (patch)
treeed344a3057ec539f258353e2ea81d86142ac75e4 /test/linter
parent3b8ff6536e6eb4b9af946e2028164e8966ec5458 (diff)
downloadale-2cfeabd1b595805e506e7d79347e30e9a52084d1.zip
Rewrite Alex Integration to Use stdin (#3982)
Since having been added, the `alex` tool has added support for linting on stdin. Rewrite this integration to reduce the number of tools requiring disk-write access. Signed-off-by: David Houston <houstdav000@gmail.com>
Diffstat (limited to 'test/linter')
-rw-r--r--test/linter/test_alex.vader8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/linter/test_alex.vader b/test/linter/test_alex.vader
index 20e20301..08a0ee10 100644
--- a/test/linter/test_alex.vader
+++ b/test/linter/test_alex.vader
@@ -7,14 +7,14 @@ After:
Execute(The global executable should be used when the local one cannot be found):
AssertLinter 'alex',
- \ ale#Escape('alex') . ' %s --text',
+ \ ale#Escape('alex') . ' --stdin --text',
Execute(Should use the node_modules/.bin executable, if available):
call ale#test#SetFilename('../test-files/alex/node-modules/test_file.tex')
AssertLinter ale#path#Simplify(g:dir . '/../test-files/alex/node-modules/node_modules/.bin/alex'),
\ ale#Escape(ale#path#Simplify(g:dir . '/../test-files/alex/node-modules/node_modules/.bin/alex'))
- \ . ' %s --text',
+ \ . ' --stdin --text',
Execute(Should use the node_modules/alex executable, if available):
call ale#test#SetFilename('../test-files/alex/node-modules-2/test_file.tex')
@@ -22,7 +22,7 @@ Execute(Should use the node_modules/alex executable, if available):
AssertLinter ale#path#Simplify(g:dir . '/../test-files/alex/node-modules-2/node_modules/alex/cli.js'),
\ (has('win32') ? 'node.exe ' : '')
\ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/alex/node-modules-2/node_modules/alex/cli.js'))
- \ . ' %s --text',
+ \ . ' --stdin --text',
Execute(Should let users configure a global executable and override local paths):
call ale#test#SetFilename('../test-files/write-good/node-modules-2/test_file.tex')
@@ -31,4 +31,4 @@ Execute(Should let users configure a global executable and override local paths)
let g:ale_alex_use_global = 1
AssertLinter '/path/to/custom/alex',
- \ ale#Escape('/path/to/custom/alex') . ' %s --text'
+ \ ale#Escape('/path/to/custom/alex') . ' --stdin --text'