summaryrefslogtreecommitdiff
path: root/test/command_callback/test_scss_sasslint_command_callback.vader
diff options
context:
space:
mode:
authorHolden <holden@axoni.com>2018-12-07 18:05:20 -0500
committerHolden <holden@axoni.com>2018-12-07 18:05:20 -0500
commit57a04701c3ac1d06efbf16f2ce184c37f0076d16 (patch)
tree8181c0025e95cd941e6abe20b45f579e1f783c08 /test/command_callback/test_scss_sasslint_command_callback.vader
parentcbc029b2b832e6d70d95e6cf810ab6252b42e643 (diff)
parent9226e13b31474ac17d0c25cd27aa55bff21d55c2 (diff)
downloadale-57a04701c3ac1d06efbf16f2ce184c37f0076d16.zip
Merge branch 'master' of github.com:stegmanh/ale
Diffstat (limited to 'test/command_callback/test_scss_sasslint_command_callback.vader')
-rw-r--r--test/command_callback/test_scss_sasslint_command_callback.vader43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/command_callback/test_scss_sasslint_command_callback.vader b/test/command_callback/test_scss_sasslint_command_callback.vader
new file mode 100644
index 00000000..1695190a
--- /dev/null
+++ b/test/command_callback/test_scss_sasslint_command_callback.vader
@@ -0,0 +1,43 @@
+Before:
+ call ale#assert#SetUpLinterTest('scss', 'sasslint')
+ call ale#test#SetFilename('test.scss')
+ unlet! b:executable
+
+After:
+ call ale#assert#TearDownLinterTest()
+
+Execute(should default to source, bin/sass-lint.js):
+ call ale#test#SetFilename('sasslint-test-files/with-source/test.scss')
+
+ let b:executable = ale#path#Simplify(
+ \ g:dir
+ \ . '/sasslint-test-files/with-source/node_modules/sass-lint/bin/sass-lint.js'
+ \)
+
+ AssertLinter b:executable,
+ \ (has('win32') ? 'node.exe ' : '')
+ \ . ale#Escape(b:executable)
+ \ . ' -v -q -f compact %t'
+
+Execute(should fallback to bin, .bin/sass-lint):
+ call ale#test#SetFilename('sasslint-test-files/with-bin/test.scss')
+
+ let b:executable = ale#path#Simplify(
+ \ g:dir
+ \ . '/sasslint-test-files/with-bin/node_modules/.bin/sass-lint'
+ \)
+
+ AssertLinter b:executable, ale#Escape(b:executable) . ' -v -q -f compact %t'
+
+Execute(should fallback to global bin):
+ AssertLinter 'sass-lint', ale#Escape('sass-lint') . ' -v -q -f compact %t'
+
+Execute(The global executable should be configurable):
+ let b:ale_scss_sasslint_executable = 'foo'
+
+ AssertLinter 'foo', ale#Escape('foo') . ' -v -q -f compact %t'
+
+Execute(The options should be configurable):
+ let b:ale_scss_sasslint_options = '--bar'
+
+ AssertLinter 'sass-lint', ale#Escape('sass-lint') . ' --bar -v -q -f compact %t'