summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-02-04 11:38:05 +0000
committerGitHub <noreply@github.com>2018-02-04 11:38:05 +0000
commit31e0f48d62fdc5e9b3c4a0da1fc51ed94d9b335b (patch)
treef4e0696df1c4bd02bdb9cdd61ff071d939720572 /test
parent7c4decf804388a670cdbcec076472627cfb585ce (diff)
parentb13f290390ba62180f731fef6cea58d6fef8bc3e (diff)
downloadale-31e0f48d62fdc5e9b3c4a0da1fc51ed94d9b335b.zip
Merge pull request #1326 from michaelquinn32/patch-1
Call lintr library before linting
Diffstat (limited to 'test')
-rw-r--r--test/command_callback/test_lintr_command_callback.vader16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/command_callback/test_lintr_command_callback.vader b/test/command_callback/test_lintr_command_callback.vader
index 3199b498..256618cf 100644
--- a/test/command_callback/test_lintr_command_callback.vader
+++ b/test/command_callback/test_lintr_command_callback.vader
@@ -17,18 +17,20 @@ Execute(The default lintr command should be correct):
AssertEqual
\ 'cd ' . ale#Escape(getcwd()) . ' && '
\ . 'Rscript -e '
- \ . ale#Escape('lintr::lint(commandArgs(TRUE)[1], eval(parse(text = commandArgs(TRUE)[2])))')
- \ . ' %t '
- \ . ale#Escape('lintr::with_defaults()'),
+ \ . ale#Escape('suppressPackageStartupMessages(library(lintr));'
+ \ . 'lint(cache = FALSE, commandArgs(TRUE),'
+ \ . 'with_defaults())')
+ \ . ' %t',
\ ale_linters#r#lintr#GetCommand(bufnr(''))
Execute(The lintr options should be configurable):
- let b:ale_r_lintr_options = 'lintr::with_defaults(object_usage_linter = NULL)'
+ let b:ale_r_lintr_options = 'with_defaults(object_usage_linter = NULL)'
AssertEqual
\ 'cd ' . ale#Escape(getcwd()) . ' && '
\ . 'Rscript -e '
- \ . ale#Escape('lintr::lint(commandArgs(TRUE)[1], eval(parse(text = commandArgs(TRUE)[2])))')
- \ . ' %t '
- \ . ale#Escape('lintr::with_defaults(object_usage_linter = NULL)'),
+ \ . ale#Escape('suppressPackageStartupMessages(library(lintr));'
+ \ . 'lint(cache = FALSE, commandArgs(TRUE),'
+ \ . 'with_defaults(object_usage_linter = NULL))')
+ \ . ' %t',
\ ale_linters#r#lintr#GetCommand(bufnr(''))