src: Fixed FilePath::canonical() for UNIX

* fixed clang warnings
* fixed ApplicationSettings loaded from wrong location in tests
* added symlink within canonical path to tests
This commit is contained in:
Eberhard Graether
2017-08-10 02:04:03 +02:00
parent ece2cbfe14
commit d9c8de2951
13 changed files with 91 additions and 89 deletions
+10
View File
@@ -170,6 +170,16 @@ public:
TS_ASSERT_EQUALS(path.absolute(), path.canonical());
}
void test_file_path_canonical_removes_symlinks()
{
#ifndef _WIN32
FilePath pathA("data/FilePathTestSuite/parent/target/d.cpp");
FilePath pathB("data/FilePathTestSuite/target/d.cpp");
TS_ASSERT_EQUALS(pathB.absolute(), pathA.canonical());
#endif
}
void test_file_path_compares_paths_with_posix_and_windows_format()
{
#ifdef _WIN32
+1 -3
View File
@@ -1,6 +1,6 @@
#include "TestSuiteFixture.h"
#include <sstream>
#include <iostream>
#include "utility/logging/FileLogger.h"
#include "utility/logging/LogManager.h"
@@ -15,8 +15,6 @@ TestSuiteFixture::~TestSuiteFixture()
{
}
#include <iostream>
bool TestSuiteFixture::setUpWorld()
{
LogManager* logManager = LogManager::getInstance().get();