summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-03-17 15:16:44 +0100
committerLars Knoll <lars.knoll@digia.com>2015-03-18 07:34:55 +0000
commit124da60c1de2cc63ad8692bd3a72e8769c6c1e5a (patch)
tree735fb65b8d30116f614e76e896feebff64101084 /tests/auto/corelib
parentba8c34aaf3683d1502e78ad7a6af700efdeaf0f9 (diff)
Fix support for iso8859-16 when compiling with ICU
ICU doesn't support iso8859-16, so we need to fall back to the Qt codec for this encoding. Task-number: QTBUG-45053 Change-Id: I9754cf098c906fe8a75363a3d090029543cd0e35 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
index c96e933f0e..3aa06d237d 100644
--- a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
+++ b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
@@ -65,6 +65,7 @@ private slots:
void aliasForUTF16() const;
void mibForTSCII() const;
void codecForTSCII() const;
+ void iso8859_16() const;
void utf8Codec_data();
void utf8Codec();
@@ -514,6 +515,13 @@ void tst_QTextCodec::codecForTSCII() const
QCOMPARE(codec->mibEnum(), 2107);
}
+void tst_QTextCodec::iso8859_16() const
+{
+ QTextCodec *codec = QTextCodec::codecForName("ISO8859-16");
+ QVERIFY(codec);
+ QCOMPARE(codec->name(), QByteArray("ISO-8859-16"));
+}
+
static QString fromInvalidUtf8Sequence(const QByteArray &ba)
{
return QString().fill(QChar::ReplacementCharacter, ba.size());