summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-12-19 18:23:09 +0000
committerw0rp <devw0rp@gmail.com>2017-12-19 18:23:09 +0000
commit1568bf81281507aaaa8c71af85e244e94bd2924c (patch)
tree4694f6d24b82b6b57a7b934aebe68ea1c09ec57b /autoload
parent73f61514c9039e7e863da3544f251d3f8d7d1956 (diff)
downloadale-1568bf81281507aaaa8c71af85e244e94bd2924c.zip
Fix the mscs tests on Windows, and use the improved Simplify for all tests instead.v1.7.0
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/path.vim17
-rw-r--r--autoload/ale/test.vim2
2 files changed, 1 insertions, 18 deletions
diff --git a/autoload/ale/path.vim b/autoload/ale/path.vim
index b0f4dca6..16dabf21 100644
--- a/autoload/ale/path.vim
+++ b/autoload/ale/path.vim
@@ -17,23 +17,6 @@ function! ale#path#Simplify(path) abort
return substitute(simplify(l:win_path), '^\\\+', '\', 'g') " no-custom-checks
endfunction
-" This function is mainly used for testing.
-"
-" If an additional 'add_drive' argument is given, the current drive letter
-" will be prefixed to any absolute paths on Windows.
-function! ale#path#Winify(path, ...) abort
- let l:new_path = ale#path#Simplify(a:path)
-
- if has('win32')
- " Add a drive letter to \foo\bar paths, if needed.
- if a:0 && a:1 is# 'add_drive' && l:new_path[:0] is# '\'
- let l:new_path = fnamemodify('.', ':p')[:1] . l:new_path
- endif
- endif
-
- return l:new_path
-endfunction
-
" Given a buffer and a filename, find the nearest file by searching upwards
" through the paths relative to the given buffer.
function! ale#path#FindNearestFile(buffer, filename) abort
diff --git a/autoload/ale/test.vim b/autoload/ale/test.vim
index 8fc4fe43..bea10c53 100644
--- a/autoload/ale/test.vim
+++ b/autoload/ale/test.vim
@@ -50,5 +50,5 @@ function! ale#test#SetFilename(path) abort
\ ? a:path
\ : l:dir . '/' . a:path
- silent! noautocmd execute 'file ' . fnameescape(ale#path#Winify(l:full_path))
+ silent! noautocmd execute 'file ' . fnameescape(ale#path#Simplify(l:full_path))
endfunction