summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-22 23:45:51 +0000
committerw0rp <devw0rp@gmail.com>2017-11-22 23:45:51 +0000
commitf99b027cc675ddd66119d0da0b120f5a22c2e54e (patch)
tree659e88cc55770f8f6cdd2de8f26313a45be75ab6 /test
parent5160f814d929e0936c3d920087e0c4d16040ae9c (diff)
downloadale-f99b027cc675ddd66119d0da0b120f5a22c2e54e.zip
Fix the JSON fixer post-processor test harder on Windows
Diffstat (limited to 'test')
-rw-r--r--test/fix/test_ale_fix.vader9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/fix/test_ale_fix.vader b/test/fix/test_ale_fix.vader
index c630ab2a..2a3e62c0 100644
--- a/test/fix/test_ale_fix.vader
+++ b/test/fix/test_ale_fix.vader
@@ -148,15 +148,20 @@ Before:
let l:ProcessWith = {buffer, output -> JSONPostProcessor(buffer, output)}
endif
+ " Escaping needs to be handled specially for CMD on Windows.
+ let l:json_string = has('win32')
+ \ ? '{"output":["x","y","z"]}'
+ \ : ale#Escape('{"output": ["x", "y", "z"]}')
+
return {
- \ 'command': 'echo ' . ale#Escape('{"output": ["x", "y", "z"]}'),
+ \ 'command': 'echo ' . l:json_string,
\ 'read_buffer': 0,
\ 'process_with': l:ProcessWith,
\}
endfunction
function! JSONPostProcessor(buffer, output) abort
- return json_decode(join(split(a:output[0]))).output
+ return json_decode(a:output[0]).output
endfunction
After: