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
Kate
Commits
e3914306
Commit
e3914306
authored
Mar 05, 2021
by
Marcell Fülöp
Browse files
Autoest cases for UrlInfo changes.
parent
c9758a96
Changes
1
Hide whitespace changes
Inline
Side-by-side
kate/autotests/urlinfo_test.cpp
View file @
e3914306
...
...
@@ -30,6 +30,12 @@ void UrlInfoTest::someCursors()
QCOMPARE
(
UrlInfo
(
QStringLiteral
(
"file:///for_sure_not_there_path_xxcv123/to/file:1234:12"
)).
cursor
,
KTextEditor
::
Cursor
(
1233
,
11
));
QCOMPARE
(
UrlInfo
(
QStringLiteral
(
"sftp://127.0.0.1:1234/path/to/file:1:1"
)).
url
.
toString
(),
QStringLiteral
(
"sftp://127.0.0.1:1234/path/to/file"
));
QCOMPARE
(
UrlInfo
(
QStringLiteral
(
"sftp://127.0.0.1:1234/path/to/file:1:1"
)).
cursor
,
KTextEditor
::
Cursor
(
0
,
0
));
// check url query string to cursor
QCOMPARE
(
UrlInfo
(
QStringLiteral
(
"sftp://127.0.0.1:1234/path/to/file?line=2&column=3"
)).
cursor
,
KTextEditor
::
Cursor
(
1
,
2
));
QCOMPARE
(
UrlInfo
(
QStringLiteral
(
"fish://remote/file?some=variable&line=4&"
)).
cursor
,
KTextEditor
::
Cursor
(
3
,
0
));
QCOMPARE
(
UrlInfo
(
QStringLiteral
(
"file:///directory/file?some=variable&column=5&other=value&line=6"
)).
cursor
,
KTextEditor
::
Cursor
(
5
,
4
));
QCOMPARE
(
UrlInfo
(
QStringLiteral
(
"~/file?line=7"
)).
url
.
hasQuery
(),
false
);
}
void
UrlInfoTest
::
urlWithColonAtStart
()
...
...
Write
Preview
Supports
Markdown
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