summaryrefslogtreecommitdiff
path: root/test/linter/test_gawk.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/linter/test_gawk.vader')
-rw-r--r--test/linter/test_gawk.vader25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/linter/test_gawk.vader b/test/linter/test_gawk.vader
new file mode 100644
index 00000000..ba9f59ab
--- /dev/null
+++ b/test/linter/test_gawk.vader
@@ -0,0 +1,25 @@
+Before:
+ call ale#assert#SetUpLinterTest('awk', 'gawk')
+
+After:
+ call ale#assert#TearDownLinterTest()
+
+Execute(The default command should be correct):
+ AssertLinter 'gawk',
+ \ ale#Escape('gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
+ \ . ' -f %t --lint /dev/null'
+
+Execute(The executable should be configurable):
+ let b:ale_awk_gawk_executable = '/other/gawk'
+
+ AssertLinter '/other/gawk',
+ \ ale#Escape('/other/gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
+ \ . ' -f %t --lint /dev/null'
+
+Execute(The options should be configurable):
+ let b:ale_awk_gawk_executable = 'gawk'
+ let b:ale_awk_gawk_options = '--something'
+
+ AssertLinter 'gawk',
+ \ ale#Escape('gawk') . ' --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
+ \ . ' --something -f %t --lint /dev/null'