tests: fix newline input in DispVM editor tests
Just '\n' isn't enough for xdotool to enter newline.
This commit is contained in:
parent
72d60788e4
commit
5c9157be05
@ -330,7 +330,9 @@ class TC_20_DispVMMixin(qubes.tests.SystemTestsMixin):
|
|||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
if "gedit" in window_title:
|
if "gedit" in window_title:
|
||||||
subprocess.check_call(['xdotool', 'windowactivate', '--sync', winid,
|
subprocess.check_call(['xdotool', 'windowactivate', '--sync', winid,
|
||||||
'type', 'Test test 2\n'])
|
'type', 'Test test 2'])
|
||||||
|
subprocess.check_call(['xdotool', 'key', '--window', winid,
|
||||||
|
'key', 'Return'])
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
subprocess.check_call(['xdotool',
|
subprocess.check_call(['xdotool',
|
||||||
'key', 'ctrl+s', 'ctrl+q'])
|
'key', 'ctrl+s', 'ctrl+q'])
|
||||||
@ -345,14 +347,18 @@ class TC_20_DispVMMixin(qubes.tests.SystemTestsMixin):
|
|||||||
winid = search.stdout.read().strip()
|
winid = search.stdout.read().strip()
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
subprocess.check_call(['xdotool', 'windowactivate', '--sync', winid,
|
subprocess.check_call(['xdotool', 'windowactivate', '--sync', winid,
|
||||||
'type', 'Test test 2\n'])
|
'type', 'Test test 2'])
|
||||||
|
subprocess.check_call(['xdotool', 'key', '--window', winid,
|
||||||
|
'key', 'Return'])
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
subprocess.check_call(['xdotool',
|
subprocess.check_call(['xdotool',
|
||||||
'key', '--delay', '100', 'ctrl+s',
|
'key', '--delay', '100', 'ctrl+s',
|
||||||
'Return', 'ctrl+q'])
|
'Return', 'ctrl+q'])
|
||||||
elif "emacs" in window_title:
|
elif "emacs" in window_title:
|
||||||
subprocess.check_call(['xdotool', 'windowactivate', '--sync', winid,
|
subprocess.check_call(['xdotool', 'windowactivate', '--sync', winid,
|
||||||
'type', 'Test test 2\n'])
|
'type', 'Test test 2'])
|
||||||
|
subprocess.check_call(['xdotool', 'key', '--window', winid,
|
||||||
|
'key', 'Return'])
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
subprocess.check_call(['xdotool',
|
subprocess.check_call(['xdotool',
|
||||||
'key', 'ctrl+x', 'ctrl+s'])
|
'key', 'ctrl+x', 'ctrl+s'])
|
||||||
@ -360,7 +366,9 @@ class TC_20_DispVMMixin(qubes.tests.SystemTestsMixin):
|
|||||||
'key', 'ctrl+x', 'ctrl+c'])
|
'key', 'ctrl+x', 'ctrl+c'])
|
||||||
elif "vim" in window_title or "user@" in window_title:
|
elif "vim" in window_title or "user@" in window_title:
|
||||||
subprocess.check_call(['xdotool', 'windowactivate', '--sync', winid,
|
subprocess.check_call(['xdotool', 'windowactivate', '--sync', winid,
|
||||||
'key', 'i', 'type', 'Test test 2\n'])
|
'key', 'i', 'type', 'Test test 2'])
|
||||||
|
subprocess.check_call(['xdotool', 'key', '--window', winid,
|
||||||
|
'key', 'Return'])
|
||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
['xdotool',
|
['xdotool',
|
||||||
'key', 'Escape', 'colon', 'w', 'q', 'Return'])
|
'key', 'Escape', 'colon', 'w', 'q', 'Return'])
|
||||||
|
Loading…
Reference in New Issue
Block a user