summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp76
1 files changed, 40 insertions, 36 deletions
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index f418372e..be146d82 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -602,10 +602,12 @@ void tst_qdeclarativetextinput::moveCursorSelection_data()
QTest::newRow("jum<()>ped|words")
<< standard[0] << 23 << 23 << QDeclarativeTextInput::SelectWords << 23 << 23 << true;
- QTest::newRow("Hello<(,)> |words")
- << standard[2] << 5 << 6 << QDeclarativeTextInput::SelectWords << 5 << 6 << true;
- QTest::newRow("Hello<(, )>world|words,ltr")
- << standard[2] << 5 << 7 << QDeclarativeTextInput::SelectWords << 5 << 7 << false;
+ QTest::newRow("<Hello(,)> |words,ltr")
+ << standard[2] << 5 << 6 << QDeclarativeTextInput::SelectWords << 0 << 6 << false;
+ QTest::newRow("Hello<(,)> |words,rtl")
+ << standard[2] << 6 << 5 << QDeclarativeTextInput::SelectWords << 5 << 6 << false;
+ QTest::newRow("<Hello(, )>world|words,ltr")
+ << standard[2] << 5 << 7 << QDeclarativeTextInput::SelectWords << 0 << 7 << false;
QTest::newRow("Hello<(, )world>|words,rtl")
<< standard[2] << 7 << 5 << QDeclarativeTextInput::SelectWords << 5 << 12 << false;
QTest::newRow("<Hel(lo, )>world|words,ltr")
@@ -618,33 +620,35 @@ void tst_qdeclarativetextinput::moveCursorSelection_data()
<< standard[2] << 5 << 5 << QDeclarativeTextInput::SelectWords << 5 << 5 << true;
QTest::newRow("Hello,<()>|words")
<< standard[2] << 6 << 6 << QDeclarativeTextInput::SelectWords << 6 << 6 << true;
- QTest::newRow("Hello<,( )>world|words,ltr")
- << standard[2] << 6 << 7 << QDeclarativeTextInput::SelectWords << 5 << 7 << false;
+ QTest::newRow("Hello,<( )>world|words,ltr")
+ << standard[2] << 6 << 7 << QDeclarativeTextInput::SelectWords << 6 << 7 << false;
QTest::newRow("Hello,<( )world>|words,rtl")
<< standard[2] << 7 << 6 << QDeclarativeTextInput::SelectWords << 6 << 12 << false;
- QTest::newRow("Hello<,( world)>|words,ltr")
- << standard[2] << 6 << 12 << QDeclarativeTextInput::SelectWords << 5 << 12 << false;
- QTest::newRow("Hello,<( world)>|words,rtl")
- << standard[2] << 12 << 6 << QDeclarativeTextInput::SelectWords << 6 << 12 << false;
- QTest::newRow("Hello<,( world!)>|words,ltr")
- << standard[2] << 6 << 13 << QDeclarativeTextInput::SelectWords << 5 << 13 << false;
- QTest::newRow("Hello,<( world!)>|words,rtl")
- << standard[2] << 13 << 6 << QDeclarativeTextInput::SelectWords << 6 << 13 << false;
- QTest::newRow("Hello<(, world!)>|words")
- << standard[2] << 5 << 13 << QDeclarativeTextInput::SelectWords << 5 << 13 << true;
- QTest::newRow("world<(!)>|words")
- << standard[2] << 12 << 13 << QDeclarativeTextInput::SelectWords << 12 << 13 << true;
+ QTest::newRow("Hello,<( world)>|words")
+ << standard[2] << 6 << 12 << QDeclarativeTextInput::SelectWords << 6 << 12 << true;
+ QTest::newRow("Hello,<( world!)>|words")
+ << standard[2] << 6 << 13 << QDeclarativeTextInput::SelectWords << 6 << 13 << true;
+ QTest::newRow("<Hello(, world!)>|words,ltr")
+ << standard[2] << 5 << 13 << QDeclarativeTextInput::SelectWords << 0 << 13 << false;
+ QTest::newRow("Hello<(, world!)>|words,rtl")
+ << standard[2] << 13 << 5 << QDeclarativeTextInput::SelectWords << 5 << 13 << false;
+ QTest::newRow("<world(!)>|words,ltr")
+ << standard[2] << 12 << 13 << QDeclarativeTextInput::SelectWords << 7 << 13 << false;
+ QTest::newRow("world<(!)>|words,rtl")
+ << standard[2] << 13 << 12 << QDeclarativeTextInput::SelectWords << 12 << 13 << false;
QTest::newRow("world!<()>)|words")
<< standard[2] << 13 << 13 << QDeclarativeTextInput::SelectWords << 13 << 13 << true;
QTest::newRow("world<()>!)|words")
<< standard[2] << 12 << 12 << QDeclarativeTextInput::SelectWords << 12 << 12 << true;
- QTest::newRow("<(,)>olleH |words")
- << standard[3] << 7 << 8 << QDeclarativeTextInput::SelectWords << 7 << 8 << true;
+ QTest::newRow("<(,)>olleH |words,ltr")
+ << standard[3] << 7 << 8 << QDeclarativeTextInput::SelectWords << 7 << 8 << false;
+ QTest::newRow("<(,)olleH> |words,rtl")
+ << standard[3] << 8 << 7 << QDeclarativeTextInput::SelectWords << 7 << 13 << false;
QTest::newRow("<dlrow( ,)>olleH|words,ltr")
<< standard[3] << 6 << 8 << QDeclarativeTextInput::SelectWords << 1 << 8 << false;
- QTest::newRow("dlrow<( ,)>olleH|words,rtl")
- << standard[3] << 8 << 6 << QDeclarativeTextInput::SelectWords << 6 << 8 << false;
+ QTest::newRow("dlrow<( ,)olleH>|words,rtl")
+ << standard[3] << 8 << 6 << QDeclarativeTextInput::SelectWords << 6 << 13 << false;
QTest::newRow("<dlrow( ,ol)leH>|words,ltr")
<< standard[3] << 6 << 10 << QDeclarativeTextInput::SelectWords << 1 << 13 << false;
QTest::newRow("dlrow<( ,ol)leH>|words,rtl")
@@ -657,20 +661,20 @@ void tst_qdeclarativetextinput::moveCursorSelection_data()
<< standard[3] << 7 << 7 << QDeclarativeTextInput::SelectWords << 7 << 7 << true;
QTest::newRow("<dlrow( )>,olleH|words,ltr")
<< standard[3] << 6 << 7 << QDeclarativeTextInput::SelectWords << 1 << 7 << false;
- QTest::newRow("dlrow<( ),>olleH|words,rtl")
- << standard[3] << 7 << 6 << QDeclarativeTextInput::SelectWords << 6 << 8 << false;
- QTest::newRow("<(dlrow )>,olleH|words,ltr")
- << standard[3] << 1 << 7 << QDeclarativeTextInput::SelectWords << 1 << 7 << false;
- QTest::newRow("<(dlrow ),>olleH|words,rtl")
- << standard[3] << 7 << 1 << QDeclarativeTextInput::SelectWords << 1 << 8 << false;
- QTest::newRow("<(!dlrow )>,olleH|words,ltr")
- << standard[3] << 0 << 7 << QDeclarativeTextInput::SelectWords << 0 << 7 << false;
- QTest::newRow("<(!dlrow ),>olleH|words,rtl")
- << standard[3] << 7 << 0 << QDeclarativeTextInput::SelectWords << 0 << 8 << false;
- QTest::newRow("(!dlrow ,)olleH|words")
- << standard[3] << 0 << 8 << QDeclarativeTextInput::SelectWords << 0 << 8 << true;
- QTest::newRow("<(!)>dlrow|words")
- << standard[3] << 0 << 1 << QDeclarativeTextInput::SelectWords << 0 << 1 << true;
+ QTest::newRow("dlrow<( )>,olleH|words,rtl")
+ << standard[3] << 7 << 6 << QDeclarativeTextInput::SelectWords << 6 << 7 << false;
+ QTest::newRow("<(dlrow )>,olleH|words")
+ << standard[3] << 1 << 7 << QDeclarativeTextInput::SelectWords << 1 << 7 << true;
+ QTest::newRow("<(!dlrow )>,olleH|words")
+ << standard[3] << 0 << 7 << QDeclarativeTextInput::SelectWords << 0 << 7 << true;
+ QTest::newRow("<(!dlrow ,)>olleH|words,ltr")
+ << standard[3] << 0 << 8 << QDeclarativeTextInput::SelectWords << 0 << 8 << false;
+ QTest::newRow("<(!dlrow ,)olleH>|words,rtl")
+ << standard[3] << 8 << 0 << QDeclarativeTextInput::SelectWords << 0 << 13 << false;
+ QTest::newRow("<(!)>dlrow|words,ltr")
+ << standard[3] << 0 << 1 << QDeclarativeTextInput::SelectWords << 0 << 1 << false;
+ QTest::newRow("<(!)dlrow|words,rtl")
+ << standard[3] << 1 << 0 << QDeclarativeTextInput::SelectWords << 0 << 6 << false;
QTest::newRow("<()>!dlrow|words")
<< standard[3] << 0 << 0 << QDeclarativeTextInput::SelectWords << 0 << 0 << true;
QTest::newRow("!<()>dlrow|words")