tests: handle vim opened in xterm without adjusted window title
On debian vim in xterm doesn't have "vim" in title, just standard user@host.
This commit is contained in:
parent
a30f1d3902
commit
9956e4c7b3
@ -1110,7 +1110,7 @@ class TC_20_DispVMMixin(qubes.tests.SystemTestsMixin):
|
|||||||
'key', 'ctrl+x', 'ctrl+s'])
|
'key', 'ctrl+x', 'ctrl+s'])
|
||||||
subprocess.check_call(['xdotool',
|
subprocess.check_call(['xdotool',
|
||||||
'key', 'ctrl+x', 'ctrl+c'])
|
'key', 'ctrl+x', 'ctrl+c'])
|
||||||
elif "vim" 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\n'])
|
||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
@ -1571,7 +1571,7 @@ class TC_50_MimeHandlers(qubes.tests.SystemTestsMixin):
|
|||||||
def test_000_txt(self):
|
def test_000_txt(self):
|
||||||
filename = "/home/user/test_file.txt"
|
filename = "/home/user/test_file.txt"
|
||||||
self.prepare_txt(filename)
|
self.prepare_txt(filename)
|
||||||
self.open_file_and_check_viewer(filename, ["vim"],
|
self.open_file_and_check_viewer(filename, ["vim", "user@"],
|
||||||
["gedit", "emacs"])
|
["gedit", "emacs"])
|
||||||
|
|
||||||
def test_001_pdf(self):
|
def test_001_pdf(self):
|
||||||
@ -1617,7 +1617,7 @@ class TC_50_MimeHandlers(qubes.tests.SystemTestsMixin):
|
|||||||
def test_100_txt_dispvm(self):
|
def test_100_txt_dispvm(self):
|
||||||
filename = "/home/user/test_file.txt"
|
filename = "/home/user/test_file.txt"
|
||||||
self.prepare_txt(filename)
|
self.prepare_txt(filename)
|
||||||
self.open_file_and_check_viewer(filename, ["vim"],
|
self.open_file_and_check_viewer(filename, ["vim", "user@"],
|
||||||
["gedit", "emacs"],
|
["gedit", "emacs"],
|
||||||
dispvm=True)
|
dispvm=True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user