2017-08-19 23:05:15 +00:00
|
|
|
Execute(Relative paths should be resolved correctly):
|
|
|
|
AssertEqual
|
2017-12-18 13:27:59 +00:00
|
|
|
\ has('win32') ? '\foo\bar\baz\whatever.txt' : '/foo/bar/baz/whatever.txt',
|
2017-08-19 23:05:15 +00:00
|
|
|
\ ale#path#GetAbsPath('/foo/bar/xyz', '../baz/whatever.txt')
|
|
|
|
AssertEqual
|
2017-12-18 13:27:59 +00:00
|
|
|
\ has('win32') ? '\foo\bar\xyz\whatever.txt' : '/foo/bar/xyz/whatever.txt',
|
2017-08-19 23:05:15 +00:00
|
|
|
\ ale#path#GetAbsPath('/foo/bar/xyz', './whatever.txt')
|
|
|
|
AssertEqual
|
2017-12-18 13:27:59 +00:00
|
|
|
\ has('win32') ? '\foo\bar\xyz\whatever.txt' : '/foo/bar/xyz/whatever.txt',
|
2017-08-19 23:05:15 +00:00
|
|
|
\ ale#path#GetAbsPath('/foo/bar/xyz', 'whatever.txt')
|
|
|
|
|
2017-12-18 13:27:59 +00:00
|
|
|
if has('win32')
|
|
|
|
AssertEqual
|
|
|
|
\ 'C:\foo\bar\baz\whatever.txt',
|
|
|
|
\ ale#path#GetAbsPath('C:\foo\bar\baz\xyz', '../whatever.txt')
|
|
|
|
endif
|
|
|
|
|
2017-08-19 23:05:15 +00:00
|
|
|
Execute(Absolute paths should be resolved correctly):
|
|
|
|
AssertEqual
|
2017-12-18 13:27:59 +00:00
|
|
|
\ has('win32') ? '\ding\dong' : '/ding/dong',
|
2017-08-19 23:05:15 +00:00
|
|
|
\ ale#path#GetAbsPath('/foo/bar/xyz', '/ding/dong')
|
2017-12-18 13:27:59 +00:00
|
|
|
|
|
|
|
AssertEqual
|
|
|
|
\ has('win32') ? '\ding\dong' : '/ding/dong',
|
|
|
|
\ ale#path#GetAbsPath('/foo/bar/xyz', '//ding/dong')
|
|
|
|
|
|
|
|
if has('win32')
|
|
|
|
AssertEqual '\ding', ale#path#GetAbsPath('/foo/bar/xyz', '\\ding')
|
|
|
|
endif
|