summaryrefslogtreecommitdiff
path: root/test/handler
diff options
context:
space:
mode:
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_cppcheck_handler.vader6
-rw-r--r--test/handler/test_perl_handler.vader7
-rw-r--r--test/handler/test_tslint_handler.vader7
3 files changed, 6 insertions, 14 deletions
diff --git a/test/handler/test_cppcheck_handler.vader b/test/handler/test_cppcheck_handler.vader
index 51efad4e..f153b9b5 100644
--- a/test/handler/test_cppcheck_handler.vader
+++ b/test/handler/test_cppcheck_handler.vader
@@ -1,10 +1,8 @@
Before:
- silent! cd /testplugin/test/handler
- let g:dir = getcwd()
+ call ale#test#SetDirectory('/testplugin/test/handler')
After:
- silent execute 'cd ' . fnameescape(g:dir)
- unlet! g:dir
+ call ale#test#RestoreDirectory()
Execute(Basic errors should be handled by cppcheck):
call ale#test#SetFilename('test.cpp')
diff --git a/test/handler/test_perl_handler.vader b/test/handler/test_perl_handler.vader
index 3ada9aa4..18c5d706 100644
--- a/test/handler/test_perl_handler.vader
+++ b/test/handler/test_perl_handler.vader
@@ -1,13 +1,10 @@
Before:
- silent! cd /testplugin/test/handler
- let g:dir = getcwd()
+ call ale#test#SetDirectory('/testplugin/test/handler')
runtime ale_linters/perl/perl.vim
After:
- silent execute 'cd ' . fnameescape(g:dir)
- unlet! g:dir
-
+ call ale#test#RestoreDirectory()
call ale#linter#Reset()
Execute(The Perl linter should ignore errors from other files):
diff --git a/test/handler/test_tslint_handler.vader b/test/handler/test_tslint_handler.vader
index 6da218b2..ae87c52e 100644
--- a/test/handler/test_tslint_handler.vader
+++ b/test/handler/test_tslint_handler.vader
@@ -1,13 +1,10 @@
Before:
runtime ale_linters/typescript/tslint.vim
- silent! cd /testplugin/test/handler
- let g:dir = getcwd()
+ call ale#test#SetDirectory('/testplugin/test/handler')
After:
- silent execute 'cd ' . fnameescape(g:dir)
- unlet! g:dir
-
+ call ale#test#RestoreDirectory()
call ale#linter#Reset()
Execute(The tslint handler should parse lines correctly):