Fixed remaining test for python3 and added a shell code test using umlauts.
This commit is contained in:
parent
ccf44a61ff
commit
f4c6046a73
@ -9,6 +9,7 @@ from subprocess import Popen, PIPE
|
||||
import stat
|
||||
import tempfile
|
||||
|
||||
from UltiSnips.compatibility import as_unicode
|
||||
from UltiSnips.text_objects._base import NoneditableTextObject
|
||||
|
||||
def _chomp(string):
|
||||
@ -38,7 +39,7 @@ def _run_shell_command(cmd, tmpdir):
|
||||
proc.wait()
|
||||
stdout, _ = proc.communicate()
|
||||
os.unlink(path)
|
||||
return _chomp(stdout.encode('utf-8'))
|
||||
return _chomp(as_unicode(stdout))
|
||||
|
||||
def _get_tmp():
|
||||
"""Find an executable tmp directory."""
|
||||
|
11
test.py
11
test.py
@ -221,8 +221,6 @@ class _VimTest(unittest.TestCase):
|
||||
output = None
|
||||
|
||||
skip_on_windows = False
|
||||
skip_on_linux = False
|
||||
skip_on_mac = False
|
||||
|
||||
def send(self,s):
|
||||
self.vim.send(s)
|
||||
@ -274,10 +272,6 @@ class _VimTest(unittest.TestCase):
|
||||
system = platform.system()
|
||||
if self.skip_on_windows and system == "Windows":
|
||||
return self._skip("Running on windows")
|
||||
if self.skip_on_linux and system == "Linux":
|
||||
return self._skip("Running on Linux")
|
||||
if self.skip_on_mac and system == "Darwin":
|
||||
return self._skip("Running on Darwin/Mac")
|
||||
|
||||
# Escape for good measure
|
||||
self.send(ESC + ESC + ESC)
|
||||
@ -860,6 +854,11 @@ class TabStop_Shell_SimpleExample(_VimTest):
|
||||
snippets = ("test", "hi `echo hallo` you!")
|
||||
keys = "test" + EX + "and more"
|
||||
wanted = "hi hallo you!and more"
|
||||
class TabStop_Shell_WithUmlauts(_VimTest):
|
||||
skip_on_windows = True
|
||||
snippets = ("test", "hi `echo höüäh` you!")
|
||||
keys = "test" + EX + "and more"
|
||||
wanted = "hi höüäh you!and more"
|
||||
class TabStop_Shell_TextInNextLine(_VimTest):
|
||||
skip_on_windows = True
|
||||
snippets = ("test", "hi `echo hallo`\nWeiter")
|
||||
|
Loading…
Reference in New Issue
Block a user