Files
GoldenCheetah/unittests/Core/utils/testUtils.cpp
Joachim Kohlhammer a00e27638f Dialog to build filter queries for similar activities (#4805)
* list all (non-zero) fields and metrics
* filter list by field / metric name
* select an operator per field (ignore, equals, contains, larger than, ...)
* available in the context menus of activity- and calendar view
2026-01-17 14:36:34 -03:00

24 lines
594 B
C++

#include "Core/Utils.h"
#include <QTest>
class TestUtils: public QObject
{
Q_OBJECT
private slots:
void quoteEscapeTest() {
QCOMPARE(Utils::quoteEscape("abc"), QString("abc"));
QCOMPARE(Utils::quoteEscape("a\bc"), QString("a\bc"));
QCOMPARE(Utils::quoteEscape("a\\bc"), QString("a\\bc"));
QCOMPARE(Utils::quoteEscape("a\"bc"), QString("a\\\"bc"));
QCOMPARE(Utils::quoteEscape("a\\\"bc"), QString("a\\\"bc"));
QCOMPARE(Utils::quoteEscape("a\\\\\"bc"), QString("a\\\\\\\"bc"));
}
};
QTEST_MAIN(TestUtils)
#include "testUtils.moc"