summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/linguist/lconvert/data/test-refs.po23
-rw-r--r--tests/auto/linguist/lconvert/data/test20.ts9
-rw-r--r--tests/auto/linguist/lconvert/tst_lconvert.cpp2
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp16
4 files changed, 50 insertions, 0 deletions
diff --git a/tests/auto/linguist/lconvert/data/test-refs.po b/tests/auto/linguist/lconvert/data/test-refs.po
new file mode 100644
index 0000000..e149a38
--- /dev/null
+++ b/tests/auto/linguist/lconvert/data/test-refs.po
@@ -0,0 +1,23 @@
+msgid ""
+msgstr ""
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Language: de_DE\n"
+
+#: themer/kdmlabel.cpp:285
+#, no-c-format
+msgctxt "date format"
+msgid "%a %d %B"
+msgstr "%a %d %B"
+
+#: foo.bar.baz
+#, no-c-format
+msgid "full java class name"
+msgstr ""
+
+#: foo.car:123 monks:here file/gar.c:17:19 no:monks:here
+#, no-c-format
+msgid "some excessive locations"
+msgstr ""
diff --git a/tests/auto/linguist/lconvert/data/test20.ts b/tests/auto/linguist/lconvert/data/test20.ts
index f042edf..0e38b4b 100644
--- a/tests/auto/linguist/lconvert/data/test20.ts
+++ b/tests/auto/linguist/lconvert/data/test20.ts
@@ -158,5 +158,14 @@
<comment>comment with | and ~ and so~</comment>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>just something obsolete</source>
+ <translation type="obsolete">translated obsoletion</translation>
+ </message>
+ <message>
+ <source>something else obsolete</source>
+ <comment>comment with | and ~ and so~</comment>
+ <translation type="obsolete">another translated obsoletion</translation>
+ </message>
</context>
</TS>
diff --git a/tests/auto/linguist/lconvert/tst_lconvert.cpp b/tests/auto/linguist/lconvert/tst_lconvert.cpp
index 998f588..a3c29d8 100644
--- a/tests/auto/linguist/lconvert/tst_lconvert.cpp
+++ b/tests/auto/linguist/lconvert/tst_lconvert.cpp
@@ -317,6 +317,8 @@ void tst_lconvert::roundtrips_data()
QTest::newRow("po-xliff-po (plural-2)") << "plural-2.po" << poXlfPo << noArgs;
QTest::newRow("po-xliff-po (plural-3)") << "plural-3.po" << poXlfPo << noArgs;
+ QTest::newRow("po-ts-po (references)") << "test-refs.po" << poTsPo << noArgs;
+
QTest::newRow("ts20-ts11-ts20 (utf8)") << "codec-utf8.ts" << tsTs11Ts << noArgs;
QTest::newRow("ts20-ts11-ts20 (cp1252)") << "codec-cp1252.ts" << tsTs11Ts << noArgs;
QTest::newRow("ts20-ts11-ts20 (dual-encoding)") << "dual-encoding.ts" << tsTs11Ts << noArgs;
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index 6c1dd8f..d6a7a01 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -183,6 +183,7 @@ private slots:
void ignoreSslErrorsListWithSlot();
void readFromClosedSocket();
void writeBigChunk();
+ void setEmptyDefaultConfiguration();
static void exitLoop()
{
@@ -1835,6 +1836,21 @@ void tst_QSslSocket::writeBigChunk()
socket->close();
}
+void tst_QSslSocket::setEmptyDefaultConfiguration()
+{
+ // used to produce a crash in QSslConfigurationPrivate::deepCopyDefaultConfiguration, QTBUG-13265
+
+ if (!QSslSocket::supportsSsl())
+ return;
+
+ QSslConfiguration emptyConf;
+ QSslConfiguration::setDefaultConfiguration(emptyConf);
+
+ QSslSocketPtr socket = newSocket();
+ socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
+
+}
+
#endif // QT_NO_OPENSSL
QTEST_MAIN(tst_QSslSocket)