diff options
| author | Christoph Berg <myon@debian.org> | 2026-06-22 12:03:44 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-06-22 12:03:44 +0200 |
| commit | d83a420f0517d7fc47aeb288a6a0cf4891784fcc (patch) | |
| tree | 6d9c83527c56458a8360ba080bf5f4ca73d526dc /tests/test_http_user_agent.cpp | |
| parent | 4b089ae3f7e9e2d5662f718f663b26a4e8ee63ca (diff) | |
New upstream version 3.0.2+dfsgupstream/3.0.2+dfsg
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" |
