Add test cases for conditional transformations

and make sure it does not break the desired behaviour
This commit is contained in:
marius 2016-02-24 14:25:43 +01:00
parent 25882e95cd
commit ed40bebabf

View File

@ -251,4 +251,19 @@ class Transformation_TestKill_InsertEnd_Kill(_VimTest):
keys = 'hallo test' + EX + 'AUCH' + ESC + \
'ehihi' + ESC + 'bb' + 'ino' + JF + 'end'
wanted = 'hallo noAUCH auchauchih_end'
class Transformation_ConditionalWithEscapedDelimiter(_VimTest):
snippets = 'test', r"$1 ${1/(aa)|.*/(?1:yes\:no\))/}"
keys = 'test' + EX + 'aa'
wanted = 'aa yes:no)'
class Transformation_ConditionalWithBackslashBeforeDelimiter(_VimTest):
snippets = 'test', r"$1 ${1/(aa)|.*/(?1:yes\\:no)/}"
keys = 'test' + EX + 'aa'
wanted = 'aa yes\\'
class Transformation_ConditionalWithBackslashBeforeDelimiter1(_VimTest):
snippets = 'test', r"$1 ${1/(aa)|.*/(?1:yes:no\\)/}"
keys = 'test' + EX + 'ab'
wanted = 'ab no\\'
# End: Transformations #}}}