From 96fdaebb5c8c8902c98c1fb43e755cf90fc15198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 18 Aug 2015 02:25:24 +0200 Subject: GH-926 implement log cleaning functionality Also adds gzip compressed log support --- tests/CMakeLists.txt | 1 + tests/tst_filematchers.cpp | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 tests/tst_filematchers.cpp (limited to 'tests') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6e66c834..238accf9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -29,6 +29,7 @@ add_unit_test(modutils tst_modutils.cpp) add_unit_test(inifile tst_inifile.cpp) add_unit_test(UpdateChecker tst_UpdateChecker.cpp) add_unit_test(DownloadTask tst_DownloadTask.cpp) +add_unit_test(filematchers tst_filematchers.cpp) add_unit_test(Resource tst_Resource.cpp) # Tests END # diff --git a/tests/tst_filematchers.cpp b/tests/tst_filematchers.cpp new file mode 100644 index 00000000..36286070 --- /dev/null +++ b/tests/tst_filematchers.cpp @@ -0,0 +1,37 @@ +#include +#include "TestUtil.h" + +class IniFileTest : public QObject +{ + Q_OBJECT +private +slots: + + void test_FSTree() + { + /* + QTest::addColumn("through"); + + QTest::newRow("unix path") << "/abc/def/ghi/jkl"; + QTest::newRow("windows path") << "C:\\Program files\\terrible\\name\\of something\\"; + QTest::newRow("Plain text") << "Lorem ipsum dolor sit amet."; + QTest::newRow("Escape sequences") << "Lorem\n\t\n\\n\\tAAZ\nipsum dolor\n\nsit amet."; + QTest::newRow("Escape sequences 2") << "\"\n\n\""; + */ + } + void test_Regexp() + { + /* + QFETCH(QString, through); + + QString there = INIFile::escape(through); + QString back = INIFile::unescape(there); + + QCOMPARE(back, through); + */ + } +}; + +QTEST_GUILESS_MAIN(IniFileTest) + +#include "tst_filematchers.moc" -- cgit v1.2.3