diff options
| author | Christoph Berg <myon@debian.org> | 2026-06-22 12:03:55 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-06-22 12:03:55 +0200 |
| commit | de18fc13175a5bf0e2b48a042d2fc06e87c88d24 (patch) | |
| tree | f517074cd603d30eb7ba7e2122d38051e4c1439c /tests/test_http_user_agent.cpp | |
| parent | b76e8361909e47f0937d4a64a5a4cb5939f51eb7 (diff) | |
| parent | d83a420f0517d7fc47aeb288a6a0cf4891784fcc (diff) | |
Update upstream source from tag 'upstream/3.0.2+dfsg'
Update to upstream version '3.0.2+dfsg'
with Debian dir 90381fe7be9f5ea84d9b16c9cccf200a3fbe138b
Diffstat (limited to 'tests/test_http_user_agent.cpp')
| -rw-r--r-- | tests/test_http_user_agent.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/test_http_user_agent.cpp b/tests/test_http_user_agent.cpp new file mode 100644 index 00000000..0bc09ea1 --- /dev/null +++ b/tests/test_http_user_agent.cpp @@ -0,0 +1,33 @@ +#include <QtTest> + +#include "revision_utils.hpp" + +class TestHttpUserAgent final + : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void includesApplicationIdentityAndPlatformContext () + { + auto const user_agent = http_user_agent (); + + QVERIFY (user_agent.startsWith ("WSJT-X/")); + QVERIFY (user_agent.contains (version ())); + + auto const build_revision = revision (); + if (!build_revision.isEmpty ()) + { + QVERIFY (user_agent.contains ("_" + build_revision)); + } + + QVERIFY (user_agent.contains ('(')); + QVERIFY (user_agent.contains (')')); + QVERIFY (!user_agent.contains ('\n')); + QVERIFY (!user_agent.contains ('\r')); + } +}; + +QTEST_GUILESS_MAIN (TestHttpUserAgent) + +#include "test_http_user_agent.moc" |
