diff options
author | w0rp <devw0rp@gmail.com> | 2017-12-18 13:27:59 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-12-18 13:27:59 +0000 |
commit | fdaac9bd781baf85d04d6b3138a2b80cd7b3a25d (patch) | |
tree | c79dc88b5d4a33e273484e6568d674e23bb6a64b /test/test_get_abspath.vader | |
parent | 31241e9ed89ddad6c015d0f9ca9bb8a4de80332e (diff) | |
download | ale-fdaac9bd781baf85d04d6b3138a2b80cd7b3a25d.zip |
Fix #1210 - Fix a Windows path issue which broke TSLint
Diffstat (limited to 'test/test_get_abspath.vader')
-rw-r--r-- | test/test_get_abspath.vader | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/test/test_get_abspath.vader b/test/test_get_abspath.vader index 5f813804..7e1b5930 100644 --- a/test/test_get_abspath.vader +++ b/test/test_get_abspath.vader @@ -1,15 +1,29 @@ Execute(Relative paths should be resolved correctly): AssertEqual - \ '/foo/bar/baz/whatever.txt', + \ has('win32') ? '\foo\bar\baz\whatever.txt' : '/foo/bar/baz/whatever.txt', \ ale#path#GetAbsPath('/foo/bar/xyz', '../baz/whatever.txt') AssertEqual - \ has('win32') ? '/foo/bar/xyz\whatever.txt' : '/foo/bar/xyz/whatever.txt', + \ has('win32') ? '\foo\bar\xyz\whatever.txt' : '/foo/bar/xyz/whatever.txt', \ ale#path#GetAbsPath('/foo/bar/xyz', './whatever.txt') AssertEqual - \ has('win32') ? '/foo/bar/xyz\whatever.txt' : '/foo/bar/xyz/whatever.txt', + \ has('win32') ? '\foo\bar\xyz\whatever.txt' : '/foo/bar/xyz/whatever.txt', \ ale#path#GetAbsPath('/foo/bar/xyz', 'whatever.txt') + if has('win32') + AssertEqual + \ 'C:\foo\bar\baz\whatever.txt', + \ ale#path#GetAbsPath('C:\foo\bar\baz\xyz', '../whatever.txt') + endif + Execute(Absolute paths should be resolved correctly): AssertEqual - \ '/ding/dong', + \ has('win32') ? '\ding\dong' : '/ding/dong', \ ale#path#GetAbsPath('/foo/bar/xyz', '/ding/dong') + + 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 |