Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
10e0abd9
Commit
10e0abd9
authored
Jun 16, 2021
by
Tomaz Canabrava
Committed by
Tomaz Canabrava
Jun 18, 2021
Browse files
Fix unittest
parent
7f647bac
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/autotests/ScreenTest.cpp
View file @
10e0abd9
...
...
@@ -47,23 +47,27 @@ void ScreenTest::testBlockSelection()
screen
.
displayCharacter
(
c
.
toLatin1
());
}
qDebug
()
<<
"Before reflow"
<<
screen
.
text
(
0
,
30
,
Screen
::
PlainText
);
// this breaks the lines in `abcd efgh `
// reflowing everything to the lines below.
screen
.
setReflowLines
(
true
);
screen
.
resizeImage
(
largeScreenLines
,
10
);
//
This call seems to be doing something wrong, I'm missing the texts after
// the "reflow".
qDebug
()
<<
"After Reflow"
<<
screen
.
text
(
0
,
30
,
Screen
::
PlainText
);
//
reflow does not reflows cursor line, so let's move it a bit down.
screen
.
cursorDown
(
1
);
screen
.
resizeImage
(
largeScreenLines
,
10
);
// True here means block selection.
screen
.
setSelectionStart
(
0
,
0
,
true
);
screen
.
setSelectionEnd
(
3
,
0
);
screen
.
setSelectionEnd
(
3
,
1
);
// after the resize, the string should be:
// abcd efgh
// ijkl mnop
// ...
// I'm selecting the first two lines of the first column of strings,
// so, abcd ijkl.
const
QString
selectedText
=
screen
.
selectedText
(
Screen
::
PlainText
);
QCOMPARE
(
screen
.
selectedText
(
Screen
::
PlainText
),
QStringLiteral
(
"abcd"
));
QCOMPARE
(
screen
.
selectedText
(
Screen
::
PlainText
),
QStringLiteral
(
"abcd
ijkl
"
));
}
void
ScreenTest
::
testLargeScreenCopyEmptyLine
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment