diff options
author | Liang Qi <liang.qi@qt.io> | 2019-02-12 18:01:29 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2019-02-12 18:13:34 +0000 |
commit | 93bcd488af0407f9808e4f977102f85c1a59a095 (patch) | |
tree | cb4a79fa9500f3210d7ec58df05b037c7e62d4eb /tests | |
parent | 0e82e1bd237fe295e0e30ec3613afd95142f3941 (diff) | |
parent | d3b3be6865b78479da6c7e822b80064a6ea08554 (diff) |
Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into refs/staging/5.13
Diffstat (limited to 'tests')
4 files changed, 32 insertions, 2 deletions
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp index 56792f38fb..6ad3357f40 100644 --- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp @@ -2396,6 +2396,19 @@ void tst_QDateTime::fromStringStringFormat_data() QTest::newRow("late") << QString("9999-12-31T23:59:59.999Z") << QString("yyyy-MM-ddThh:mm:ss.zZ") << QDateTime(QDate(9999, 12, 31), QTime(23, 59, 59, 999)); + // Separators match /([^aAdhHMmstyz]*)/ + QTest::newRow("oddly-separated") // To show broken-separator's format is valid. + << QStringLiteral("2018 wilful long working block relief 12-19T21:09 cruel blurb encore flux") + << QStringLiteral("yyyy wilful long working block relief MM-ddThh:mm cruel blurb encore flux") + << QDateTime(QDate(2018, 12, 19), QTime(21, 9)); + QTest::newRow("broken-separator") + << QStringLiteral("2018 wilful") + << QStringLiteral("yyyy wilful long working block relief MM-ddThh:mm cruel blurb encore flux") + << invalidDateTime(); + QTest::newRow("broken-terminator") + << QStringLiteral("2018 wilful long working block relief 12-19T21:09 cruel") + << QStringLiteral("yyyy wilful long working block relief MM-ddThh:mm cruel blurb encore flux") + << invalidDateTime(); } void tst_QDateTime::fromStringStringFormat() diff --git a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp index 29eef506bf..22f00c677d 100644 --- a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp +++ b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp @@ -431,6 +431,12 @@ void tst_QTextTable::insertRows() table->insertRows(5, 2); QCOMPARE(table->rows(), 7); + table = cursor.insertTable(5,5); + table->mergeCells(0,0,3,3); + table->insertRows(2,1); + + QCOMPARE(table->rows(), 6); + } void tst_QTextTable::deleteInTable() diff --git a/tests/auto/other/qcomplextext/bidireorderstring.h b/tests/auto/other/qcomplextext/bidireorderstring.h index a7401d2c18..b537bf45e4 100644 --- a/tests/auto/other/qcomplextext/bidireorderstring.h +++ b/tests/auto/other/qcomplextext/bidireorderstring.h @@ -78,7 +78,7 @@ const LV logical_visual[] = { { "data42", "foo\nfoo", "foo\nfoo", QChar::DirL }, { "data43", "\327\251\327\234\327\225\327\235\n\327\251\327\234\327\225\327\235", "\327\235\327\225\327\234\327\251\n\327\235\327\225\327\234\327\251", QChar::DirR }, { "data44", "foo\n\327\251\327\234\327\225\327\235", "foo\n\327\235\327\225\327\234\327\251", QChar::DirL }, - { "data45", "\327\251\327\234\327\225\327\235\nfoo", "\327\235\327\225\327\234\327\251\nfoo", QChar::DirR }, + { "data45", "\327\251\327\234\327\225\327\235\nfoo", "foo\n\327\235\327\225\327\234\327\251", QChar::DirR }, { "data46", "\330\250 1.23 \330\250", "\330\250 1.23 \330\250", QChar::DirR }, { "data47", "\331\204\330\250 1.23 \331\202\330\250", "\330\250\331\202 1.23 \330\250\331\204", QChar::DirR }, { "data48", "\330\250 1.2 \330\250", "\330\250 1.2 \330\250", QChar::DirR }, diff --git a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp index 0116e546a0..9ca61a69b4 100644 --- a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp +++ b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp @@ -66,8 +66,19 @@ void tst_QComplexText::bidiReorderString_data() << QString::fromUtf8( data->logical ) << QString::fromUtf8( data->visual ) << (int) data->basicDir; + + QTest::newRow( QByteArray(data->name) + " (doubled)" ) + << (QString::fromUtf8( data->logical ) + QChar(QChar::ParagraphSeparator) + QString::fromUtf8( data->logical )) + << (QString::fromUtf8( data->visual ) + QChar(QChar::ParagraphSeparator) + QString::fromUtf8( data->visual )) + << (int) data->basicDir; data++; } + + QString isolateAndBoundary = QString(QChar(0x2068 /* DirFSI */)) + QChar(0x1c /* DirB */) + QChar(0x2069 /* DirPDI */); + QTest::newRow( "isolateAndBoundary" ) + << QString::fromUtf8( data->logical ) + << QString::fromUtf8( data->visual ) + << (int) QChar::DirL; } void tst_QComplexText::bidiReorderString() @@ -426,7 +437,7 @@ ushort unicodeForDirection(const QByteArray &direction) { "ET", 0x24 }, { "AN", 0x660 }, { "CS", 0x2c }, - { "B", QChar::ParagraphSeparator }, + { "B", '\n' }, { "S", 0x9 }, { "WS", 0x20 }, { "ON", 0x2a }, |