aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/tools')
-rw-r--r--tests/auto/tools/tst_tools.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/tools/tst_tools.cpp b/tests/auto/tools/tst_tools.cpp
index 956d24a04..476a74d78 100644
--- a/tests/auto/tools/tst_tools.cpp
+++ b/tests/auto/tools/tst_tools.cpp
@@ -30,6 +30,7 @@
#include <app/shared/commandlineparser.h>
#include <logging/logger.h>
#include <tools/fileinfo.h>
+#include <tools/hostosinfo.h>
#include <QDir>
#include <QtTest>
@@ -86,9 +87,8 @@ private slots:
QCOMPARE(FileInfo::path("/abc/lol"), QString("/abc"));
QVERIFY(!FileInfo::isAbsolute("bla/lol"));
QVERIFY(FileInfo::isAbsolute("/bla/lol"));
-#ifdef Q_OS_WIN
- QVERIFY(FileInfo::isAbsolute("C:\\bla\\lol"));
-#endif
+ if (HostOsInfo::isWindowsHost())
+ QVERIFY(FileInfo::isAbsolute("C:\\bla\\lol"));
QCOMPARE(FileInfo::resolvePath("/abc/lol", "waffl"), QString("/abc/lol/waffl"));
QCOMPARE(FileInfo::resolvePath("/abc/def/ghi/jkl/", "../foo/bar"), QString("/abc/def/ghi/foo/bar"));
QCOMPARE(FileInfo::resolvePath("/abc/def/ghi/jkl/", "../../foo/bar"), QString("/abc/def/foo/bar"));