Skip to content

Commit

Permalink
Fix pl.path tests failing on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mpeterv committed Jul 22, 2016
1 parent e5dfd66 commit 8429de6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests/test-path.lua
Expand Up @@ -54,14 +54,17 @@ testnorm('./a', 'a')
testnorm('a/.', 'a')
testnorm('a/', 'a')
testnorm('/a', '/a')
testnorm('//a', '//a')
testnorm('///a', '/a')

if path.is_windows then
asserteq(norm [[\a\.\b]],p)
-- UNC paths
asserteq(norm [[\\bonzo\..\dog]], [[\\dog]])
asserteq(norm [[\\?\c:\bonzo\dog\.\]],[[\\?\c:\bonzo\dog]])
testnorm('C://a', 'C:/a')
testnorm('C:/../a', 'C:/../a')
asserteq(norm [[\a\.\b]], p)
-- UNC paths
asserteq(norm [[\\bonzo\..\dog]], [[\\dog]])
asserteq(norm [[\\?\c:\bonzo\dog\.\]], [[\\?\c:\bonzo\dog]])
else
testnorm('//a', '//a')
testnorm('///a', '/a')
end

asserteq(norm '1/2/../3/4/../5',norm '1/3/5')
Expand Down

0 comments on commit 8429de6

Please sign in to comment.