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:
Marek Marczykowski-Górecki 2016-06-24 19:43:22 +02:00
parent a30f1d3902
commit 9956e4c7b3
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -1110,7 +1110,7 @@ class TC_20_DispVMMixin(qubes.tests.SystemTestsMixin):
'key', 'ctrl+x', 'ctrl+s'])
subprocess.check_call(['xdotool',
'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,
'key', 'i', 'type', 'test test 2\n'])
subprocess.check_call(
@ -1571,7 +1571,7 @@ class TC_50_MimeHandlers(qubes.tests.SystemTestsMixin):
def test_000_txt(self):
filename = "/home/user/test_file.txt"
self.prepare_txt(filename)
self.open_file_and_check_viewer(filename, ["vim"],
self.open_file_and_check_viewer(filename, ["vim", "user@"],
["gedit", "emacs"])
def test_001_pdf(self):
@ -1617,7 +1617,7 @@ class TC_50_MimeHandlers(qubes.tests.SystemTestsMixin):
def test_100_txt_dispvm(self):
filename = "/home/user/test_file.txt"
self.prepare_txt(filename)
self.open_file_and_check_viewer(filename, ["vim"],
self.open_file_and_check_viewer(filename, ["vim", "user@"],
["gedit", "emacs"],
dispvm=True)