Add tests for server paths
test.isequal("%HOME%/user", path.getabsolute("%HOME%/user"))
end
+ function suite.getabsolute_onServerPath()
+ test.isequal("//Server/Volume", path.getabsolute("//Server/Volume"))
+ end
+
function suite.getabsolute_onMultipleEnvVar()
test.isequal("$(HOME)/$(USER)", path.getabsolute("$(HOME)/$(USER)"))
end
test.isequal("obj/debug", path.getrelative("C:/Code/Premake4", "C:/Code/Premake4/obj/debug"))
end
+ function suite.getrelative_ReturnsChildPath_OnServerPath()
+ test.isequal("../Volume", path.getrelative("//Server/Shared", "//Server/Volume"))
+ end
+
function suite.getrelative_ReturnsAbsPath_OnDifferentDriveLetters()
test.isequal("D:/Files", path.getrelative("C:/Code/Premake4", "D:/Files"))
end
test.isequal("/opt/include", path.getrelative("/home/me/src/project", "/opt/include"))
end
+ function suite.getrelative_ReturnsAbsPath_OnServerPath()
+ test.isequal("//Server/Volume", path.getrelative("C:/Files", "//Server/Volume"))
+ end
+
+ function suite.getrelative_ReturnsAbsPath_OnDifferentServers()
+ test.isequal("//Server/Volume", path.getrelative("//Computer/Users", "//Server/Volume"))
+ end
+
function suite.getrelative_ignoresExtraSlashes2()
test.isequal("..", path.getrelative("/a//b/c","/a/b"))
end
