diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_path_uri.vader | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_path_uri.vader b/test/test_path_uri.vader index a3e68d98..504aba77 100644 --- a/test/test_path_uri.vader +++ b/test/test_path_uri.vader @@ -2,8 +2,22 @@ Execute(ale#path#ToURI should work for Windows paths): AssertEqual 'file:///C:/foo/bar/baz.tst', ale#path#ToURI('C:\foo\bar\baz.tst') AssertEqual 'foo/bar/baz.tst', ale#path#ToURI('foo\bar\baz.tst') +Execute(ale#path#FromURI should work for Unix paths): + AssertEqual '/foo/bar/baz.tst', ale#path#FromURI('file:///foo/bar/baz.tst') + AssertEqual '/foo/bar/baz.tst', ale#path#FromURI('file:/foo/bar/baz.tst') + AssertEqual '/foo/bar/baz.tst', ale#path#FromURI('FILE:///foo/bar/baz.tst') + AssertEqual '/foo/bar/baz.tst', ale#path#FromURI('FILE:/foo/bar/baz.tst') + Execute(ale#path#FromURI should work for Windows paths): AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('file:///C:/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('file:/C:/foo/bar/baz.tst') + AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromURI('file:///c:/foo/bar/baz.tst') + AssertEqual 'c:\foo\bar\baz.tst', ale#path#FromURI('file:/c:/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('FILE:///C:/foo/bar/baz.tst') + AssertEqual 'C:\foo\bar\baz.tst', ale#path#FromURI('FILE:/C:/foo/bar/baz.tst') + +Execute(ale#path#FromURI should handle encoded paths that look like drive letters): + AssertEqual '/C:/foo/bar/baz.tst', ale#path#FromURI('file:///C%3A/foo/bar/baz.tst') Execute(ale#path#ToURI should work for Unix paths): AssertEqual 'file:///foo/bar/baz.tst', ale#path#ToURI('/foo/bar/baz.tst') |