Echo typed characters in Wine edit fields
This commit is contained in:
1 parent
d9aa40e16c
commit
a002c4cc1e
7 files changed
+154
-22
No files matched your search
@@ -251,8 +251,10 @@ with tempfile.TemporaryDirectory(prefix="wine-access-menus-") as temporary:
|
||||
"N unselected", "N deleted"):
|
||||
assert expected in spoken, f"missing Notepad feedback: {expected!r}; {text_events!r}"
|
||||
assert spoken.count("l") == 2, "Notepad lost repeated characters"
|
||||
typed = [e[2] for e in text_events if e[1] == "text" and "kind=8" in e[5]]
|
||||
assert typed == ["z", "z", "space", "new line"], f"Notepad typing echo missing or incorrect: {typed!r}"
|
||||
assert any(e[3] == "edit" and e[4] == "otepad second line" for e in text_events), "Notepad menu return missing"
|
||||
print("PASS: actual Wine Notepad keyboard characters, words, lines, selection, deletion, and menu return")
|
||||
print("PASS: actual Wine Notepad typing echo, keyboard characters, words, lines, selection, deletion, and menu return")
|
||||
sys.exit(0)
|
||||
if args.fixture == "scintilla":
|
||||
textEvents = [e for e in events if e[0].endswith(":text")]
|
||||
@@ -302,13 +304,16 @@ with tempfile.TemporaryDirectory(prefix="wine-access-menus-") as temporary:
|
||||
for line in ("readonly first", "readonly second"):
|
||||
assert any(e[1] == "text" and e[2] == line for e in text_events), f"read-only arrow feedback missing: {line}"
|
||||
assert "r deleted" not in spoken, "read-only document reported an unsuccessful deletion"
|
||||
typed = [e[2] for e in text_events if e[1] == "text" and "kind=8" in e[5]]
|
||||
assert typed == ["z", "z", "space", "\u00e9", "\U0001f600", "new line", "tab", "q", "L", "\U0001f600"], f"typing echo missing or incorrect: {typed!r}"
|
||||
assert not any(e[1] == "text" and e[2] in ("!", "@", "~", "%") for e in events), "rejected, password or background typing leaked"
|
||||
if args.fixture == "winforms":
|
||||
assert any(e[2] == "Email" and e[3] == "edit" and e[4] == "alpha beta"
|
||||
for e in text_events), "managed email label/focus missing"
|
||||
assert any(e[2] == "Password" and e[3] == "edit" and e[6] == "password"
|
||||
and e[4] == "" for e in text_events), "managed password label/protection missing"
|
||||
assert not any(e[2] == "Unrelated" for e in text_events), "unrelated label associated with field"
|
||||
print("PASS: editor focus, characters, words, lines, selection, deletion, Unicode, passwords, and read-only controls")
|
||||
print("PASS: editor focus, typing echo, characters, words, lines, selection, deletion, Unicode, passwords, and read-only controls")
|
||||
sys.exit(0)
|
||||
menus = [event for event in events if ":menu:" in event[0]]
|
||||
for event in menus:
|
||||
|
||||
Reference in new issue
Block a user