2017-04-29 13:03:08 -04:00
|
|
|
Execute(ale#path#IsBufferPath should match simple relative paths):
|
|
|
|
silent file! foo.txt
|
|
|
|
|
|
|
|
Assert ale#path#IsBufferPath(bufnr(''), 'foo.txt'), 'No match for foo.txt'
|
|
|
|
Assert !ale#path#IsBufferPath(bufnr(''), 'bar.txt'), 'Bad match for bar.txt'
|
|
|
|
|
|
|
|
Execute(ale#path#IsBufferPath should match absolute paths):
|
|
|
|
silent file! foo.txt
|
|
|
|
|
|
|
|
Assert ale#path#IsBufferPath(bufnr(''), getcwd() . '/foo.txt'), 'No match for foo.txt'
|
|
|
|
Assert !ale#path#IsBufferPath(bufnr(''), getcwd() . '/bar.txt'), 'Bad match for bar.txt'
|
|
|
|
|
2017-06-06 15:08:19 -04:00
|
|
|
Execute(ale#path#IsBufferPath should match paths beginning with ./):
|
|
|
|
silent file! foo.txt
|
|
|
|
|
|
|
|
Assert ale#path#IsBufferPath(bufnr(''), './foo.txt'), 'No match for ./foo.txt'
|
|
|
|
|
|
|
|
Execute(ale#path#IsBufferPath should match if our path ends with the test path):
|
|
|
|
silent file! foo/bar/baz.txt
|
|
|
|
|
|
|
|
Assert ale#path#IsBufferPath(bufnr(''), 'bar/baz.txt'), 'No match for bar/baz.txt'
|
|
|
|
|
|
|
|
Execute(ale#path#IsBufferPath should match paths with redundant slashes):
|
2017-04-29 13:03:08 -04:00
|
|
|
silent file! foo.txt
|
|
|
|
|
2017-06-06 15:08:19 -04:00
|
|
|
Assert ale#path#IsBufferPath(bufnr(''), getcwd() . '////foo.txt'), 'No match for foo.txt'
|