Fixed handling of relative paths in configuration files (#69)

This commit is contained in:
Bartek Kryza
2023-01-21 18:00:21 +01:00
parent b3701fa810
commit 78cfa630e5
99 changed files with 221 additions and 207 deletions

View File

@@ -228,6 +228,18 @@ TEST_CASE("Test path_to_url", "[unit-test]")
#endif
}
TEST_CASE("Test ensure_path_is_absolute", "[unit-test]")
{
using namespace clanguml::util;
CHECK(ensure_path_is_absolute("a/b/c", "/tmp").string() == "/tmp/a/b/c");
CHECK(ensure_path_is_absolute("/a/b/c", "/tmp").string() == "/a/b/c");
CHECK(ensure_path_is_absolute("", "/tmp").string() == "/tmp/");
CHECK(ensure_path_is_absolute(".", "/tmp").string() == "/tmp/");
CHECK(ensure_path_is_absolute("..", "/tmp").string() == "/");
CHECK(ensure_path_is_absolute("/", "/tmp").string() == "/");
}
TEST_CASE("Test hash_seed", "[unit-test]")
{
using namespace clanguml::util;