Update tests to make test -a option only when unidecode is installed
This commit is contained in:
parent
9e813c7f3e
commit
de7bff28df
12
test.py
12
test.py
@ -40,6 +40,12 @@ import subprocess
|
||||
|
||||
from textwrap import dedent
|
||||
|
||||
try:
|
||||
import unidecode
|
||||
UNIDECODE_IMPORTED = True
|
||||
except ImportError:
|
||||
UNIDECODE_IMPORTED = False
|
||||
|
||||
# Some constants for better reading
|
||||
BS = '\x7f'
|
||||
ESC = '\x1b'
|
||||
@ -1472,11 +1478,13 @@ class Transformation_CleverTransformLongLower_ExceptCorrectResult(_VimTest):
|
||||
snippets = ("test", "$1 ${1/(.*)/\L$1\E/}")
|
||||
keys = "test" + EX + "HALLO"
|
||||
wanted = "HALLO hallo"
|
||||
class Transformation_SimpleCaseAsciiResult(_VimTest):
|
||||
|
||||
if UNIDECODE_IMPORTED:
|
||||
class Transformation_SimpleCaseAsciiResult(_VimTest):
|
||||
snippets = ("ascii", "$1 ${1/(.*)/$1/a}")
|
||||
keys = "ascii" + EX + "éèàçôïÉÈÀÇÔÏ€"
|
||||
wanted = "éèàçôïÉÈÀÇÔÏ€ eeacoiEEACOIEU"
|
||||
class Transformation_LowerCaseAsciiResult(_VimTest):
|
||||
class Transformation_LowerCaseAsciiResult(_VimTest):
|
||||
snippets = ("ascii", "$1 ${1/(.*)/\L$1\E/a}")
|
||||
keys = "ascii" + EX + "éèàçôïÉÈÀÇÔÏ€"
|
||||
wanted = "éèàçôïÉÈÀÇÔÏ€ eeacoieeacoieu"
|
||||
|
Loading…
Reference in New Issue
Block a user