Update tests to make test -a option only when unidecode is installed
This commit is contained in:
parent
9e813c7f3e
commit
de7bff28df
24
test.py
24
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,14 +1478,16 @@ class Transformation_CleverTransformLongLower_ExceptCorrectResult(_VimTest):
|
||||
snippets = ("test", "$1 ${1/(.*)/\L$1\E/}")
|
||||
keys = "test" + EX + "HALLO"
|
||||
wanted = "HALLO hallo"
|
||||
class Transformation_SimpleCaseAsciiResult(_VimTest):
|
||||
snippets = ("ascii", "$1 ${1/(.*)/$1/a}")
|
||||
keys = "ascii" + EX + "éèàçôïÉÈÀÇÔÏ€"
|
||||
wanted = "éèàçôïÉÈÀÇÔÏ€ eeacoiEEACOIEU"
|
||||
class Transformation_LowerCaseAsciiResult(_VimTest):
|
||||
snippets = ("ascii", "$1 ${1/(.*)/\L$1\E/a}")
|
||||
keys = "ascii" + EX + "éèàçôïÉÈÀÇÔÏ€"
|
||||
wanted = "éèàçôïÉÈÀÇÔÏ€ eeacoieeacoieu"
|
||||
|
||||
if UNIDECODE_IMPORTED:
|
||||
class Transformation_SimpleCaseAsciiResult(_VimTest):
|
||||
snippets = ("ascii", "$1 ${1/(.*)/$1/a}")
|
||||
keys = "ascii" + EX + "éèàçôïÉÈÀÇÔÏ€"
|
||||
wanted = "éèàçôïÉÈÀÇÔÏ€ eeacoiEEACOIEU"
|
||||
class Transformation_LowerCaseAsciiResult(_VimTest):
|
||||
snippets = ("ascii", "$1 ${1/(.*)/\L$1\E/a}")
|
||||
keys = "ascii" + EX + "éèàçôïÉÈÀÇÔÏ€"
|
||||
wanted = "éèàçôïÉÈÀÇÔÏ€ eeacoieeacoieu"
|
||||
|
||||
class Transformation_ConditionalInsertionSimple_ExceptCorrectResult(_VimTest):
|
||||
snippets = ("test", "$1 ${1/(^a).*/(?0:began with an a)/}")
|
||||
|
Loading…
Reference in New Issue
Block a user