summaryrefslogtreecommitdiff
path: root/test/command_callback
diff options
context:
space:
mode:
authorSander van Harmelen <sander@xanzy.io>2017-07-12 09:51:44 +0200
committerSander van Harmelen <sander@xanzy.io>2017-07-12 09:51:44 +0200
commitb2be833744db7e4a293bae5341891a012a276ffc (patch)
tree49a0fd0252372032aab910a5eca441bea19652ed /test/command_callback
parent340c0bbac53df00c2d0c00d3e626776c4a6016bf (diff)
downloadale-b2be833744db7e4a293bae5341891a012a276ffc.zip
Fixup #756
The real fix was not using absolute paths anymore (so not expanding with the `:p` option). The regex was correct and should at least include the `^` character to make sure the string starts with the given path/filename and not references the path/filename in some error description.
Diffstat (limited to 'test/command_callback')
-rw-r--r--test/command_callback/test_gometalinter_command_callback.vader6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/command_callback/test_gometalinter_command_callback.vader b/test/command_callback/test_gometalinter_command_callback.vader
index a0f4da4f..912396cb 100644
--- a/test/command_callback/test_gometalinter_command_callback.vader
+++ b/test/command_callback/test_gometalinter_command_callback.vader
@@ -22,7 +22,7 @@ Execute(The gometalinter callback should return the right defaults):
\ ale_linters#go#gometalinter#GetExecutable(bufnr(''))
AssertEqual
\ ale#Escape('gometalinter')
- \ . ' --include=' . ale#Escape(ale#util#EscapePCRE(expand('%')))
+ \ . ' --include=' . ale#Escape('^' . ale#util#EscapePCRE(expand('%')))
\ . ' ' . ale#Escape(getcwd()),
\ ale_linters#go#gometalinter#GetCommand(bufnr(''))
@@ -34,7 +34,7 @@ Execute(The gometalinter callback should use a configured executable):
\ ale_linters#go#gometalinter#GetExecutable(bufnr(''))
AssertEqual
\ ale#Escape('something else')
- \ . ' --include=' . ale#Escape(ale#util#EscapePCRE(expand('%')))
+ \ . ' --include=' . ale#Escape('^' . ale#util#EscapePCRE(expand('%')))
\ . ' ' . ale#Escape(getcwd()),
\ ale_linters#go#gometalinter#GetCommand(bufnr(''))
@@ -43,7 +43,7 @@ Execute(The gometalinter callback should use configured options):
AssertEqual
\ ale#Escape('gometalinter')
- \ . ' --include=' . ale#Escape(ale#util#EscapePCRE(expand('%')))
+ \ . ' --include=' . ale#Escape('^' . ale#util#EscapePCRE(expand('%')))
\ . ' --foobar'
\ . ' ' . ale#Escape(getcwd()),
\ ale_linters#go#gometalinter#GetCommand(bufnr(''))