Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
10425906
Commit
10425906
authored
Feb 25, 2023
by
Jinoh Kang
Committed by
Alexandre Julliard
Apr 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20/tests: Test for word movement across paragraph boundary.
(cherry picked from commit
21d25b17
)
parent
079e5eab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
editor.c
dlls/riched20/tests/editor.c
+49
-0
No files found.
dlls/riched20/tests/editor.c
View file @
10425906
...
...
@@ -7205,6 +7205,54 @@ static void test_word_movement(void)
DestroyWindow
(
hwnd
);
}
static
void
test_word_movement_multiline
(
void
)
{
DWORD
sel_start
,
sel_end
;
LRESULT
result
;
HWND
hwnd
;
/* multi-line control inserts CR normally */
hwnd
=
new_richedit
(
NULL
);
result
=
SendMessageA
(
hwnd
,
WM_SETTEXT
,
0
,
(
LPARAM
)
"Lorem ipsum
\r
dolor sit
\r
namet"
);
ok
(
result
==
TRUE
,
"WM_SETTEXT returned %Iu.
\n
"
,
result
);
SendMessageA
(
hwnd
,
EM_SETSEL
,
0
,
0
);
/* [|Lorem ipsum] [dolor sit] [amet] */
send_ctrl_key
(
hwnd
,
VK_RIGHT
);
/* [Lorem |ipsum] [dolor sit] [amet] */
sel_start
=
sel_end
=
0xdeadbeefUL
;
SendMessageA
(
hwnd
,
EM_GETSEL
,
(
WPARAM
)
&
sel_start
,
(
LPARAM
)
&
sel_end
);
ok
(
sel_start
==
sel_end
,
"expected sel length to be 0, got %lu.
\n
"
,
sel_end
-
sel_start
);
ok
(
sel_start
==
6
,
"expected sel_start to be %u, got %lu.
\n
"
,
6
,
sel_start
);
send_ctrl_key
(
hwnd
,
VK_RIGHT
);
/* [Lorem ipsum|] [dolor sit] [amet] */
sel_start
=
sel_end
=
0xdeadbeefUL
;
SendMessageA
(
hwnd
,
EM_GETSEL
,
(
WPARAM
)
&
sel_start
,
(
LPARAM
)
&
sel_end
);
ok
(
sel_start
==
sel_end
,
"expected sel length to be 0, got %lu.
\n
"
,
sel_end
-
sel_start
);
todo_wine
ok
(
sel_start
==
11
,
"expected sel_start to be %u, got %lu.
\n
"
,
11
,
sel_start
);
send_ctrl_key
(
hwnd
,
VK_RIGHT
);
/* [Lorem ipsum] [|dolor sit] [amet] */
sel_start
=
sel_end
=
0xdeadbeefUL
;
SendMessageA
(
hwnd
,
EM_GETSEL
,
(
WPARAM
)
&
sel_start
,
(
LPARAM
)
&
sel_end
);
ok
(
sel_start
==
sel_end
,
"expected sel length to be 0, got %lu.
\n
"
,
sel_end
-
sel_start
);
todo_wine
ok
(
sel_start
==
12
,
"expected sel_start to be %u, got %lu.
\n
"
,
12
,
sel_start
);
send_ctrl_key
(
hwnd
,
VK_LEFT
);
/* [Lorem ipsum|] [dolor sit] [amet] */
sel_start
=
sel_end
=
0xdeadbeefUL
;
SendMessageA
(
hwnd
,
EM_GETSEL
,
(
WPARAM
)
&
sel_start
,
(
LPARAM
)
&
sel_end
);
ok
(
sel_start
==
sel_end
,
"expected sel length to be 0, got %lu.
\n
"
,
sel_end
-
sel_start
);
todo_wine
ok
(
sel_start
==
11
,
"expected sel_start to be %u, got %lu.
\n
"
,
11
,
sel_start
);
DestroyWindow
(
hwnd
);
}
static
void
test_EM_CHARFROMPOS
(
void
)
{
HWND
hwnd
;
...
...
@@ -9113,6 +9161,7 @@ START_TEST( editor )
test_eventMask
();
test_undo_coalescing
();
test_word_movement
();
test_word_movement_multiline
();
test_EM_CHARFROMPOS
();
test_SETPARAFORMAT
();
test_word_wrap
();
...
...
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