diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-10 09:35:51 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-10 11:01:59 (GMT) |
commit | c21f95aab2228168452d1d7bb4e332a8c6164a02 (patch) | |
tree | 112afae04b8ab53d8e3f6f7d6cda1d79fe70ceaf /tests | |
parent | 2281a3a7a62a5a81de7fefaf0b84f130b16bd44f (diff) | |
download | Qt-c21f95aab2228168452d1d7bb4e332a8c6164a02.zip Qt-c21f95aab2228168452d1d7bb4e332a8c6164a02.tar.gz Qt-c21f95aab2228168452d1d7bb4e332a8c6164a02.tar.bz2 |
Added one test for QRegExp
Task-number: QT-1289
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qregexp/tst_qregexp.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qregexp/tst_qregexp.cpp b/tests/auto/qregexp/tst_qregexp.cpp index ea07323..d0d26ee 100644 --- a/tests/auto/qregexp/tst_qregexp.cpp +++ b/tests/auto/qregexp/tst_qregexp.cpp @@ -105,6 +105,7 @@ private slots: void QTBUG_7049_data(); void QTBUG_7049(); + void interval(); }; // Testing get/set functions @@ -1426,5 +1427,22 @@ void tst_QRegExp::QTBUG_7049() QCOMPARE( re.cap(2), cap2 ); } +void tst_QRegExp::interval() +{ + { + QRegExp exp("a{0,1}"); + QVERIFY(exp.isValid()); + } + { + QRegExp exp("a{1,1}"); + QVERIFY(exp.isValid()); + } + { + QRegExp exp("a{1,0}"); + QVERIFY(!exp.isValid()); + } +} + + QTEST_APPLESS_MAIN(tst_QRegExp) #include "tst_qregexp.moc" |