Fixed remaining tests.

This commit is contained in:
Holger Rapp 2014-02-05 19:13:34 +01:00
parent a7de815f47
commit ed2a0c517f

18
test.py
View File

@ -701,24 +701,24 @@ class TabStopTestJumpingRLExampleWithZeroTab_ExceptCorrectResult(_VimTest):
class TabStopTestJumpingDontJumpToEndIfThereIsTabZero_ExceptCorrectResult(_VimTest): class TabStopTestJumpingDontJumpToEndIfThereIsTabZero_ExceptCorrectResult(_VimTest):
snippets = ("hallo", "hallo $0 $1") snippets = ("hallo", "hallo $0 $1")
keys = "hallo" + EX + "Test" + JF + "Hi" + JF + JF + "du" keys = "hallo" + EX + "Test" + JF + "Hi" + JF + JF + "du"
wanted = "hallo Hidu Test" wanted = "hallo Hi" + 2*JF + "du Test"
class TabStopTestBackwardJumping_ExceptCorrectResult(_VimTest): class TabStopTestBackwardJumping_ExceptCorrectResult(_VimTest):
snippets = ("hallo", "hallo ${2:End} mitte${1:Beginning}") snippets = ("hallo", "hallo ${2:End} mitte${1:Beginning}")
keys = "hallo" + EX + "Somelengthy Text" + JF + "Hi" + JB + \ keys = "hallo" + EX + "Somelengthy Text" + JF + "Hi" + JB + \
"Lets replace it again" + JF + "Blah" + JF + JB*2 + JF "Lets replace it again" + JF + "Blah" + JF + JB*2 + JF
wanted = "hallo Blah mitteLets replace it again" wanted = "hallo Blah mitteLets replace it again" + JB*2 + JF
class TabStopTestBackwardJumping2_ExceptCorrectResult(_VimTest): class TabStopTestBackwardJumping2_ExceptCorrectResult(_VimTest):
snippets = ("hallo", "hallo $2 $1") snippets = ("hallo", "hallo $2 $1")
keys = "hallo" + EX + "Somelengthy Text" + JF + "Hi" + JB + \ keys = "hallo" + EX + "Somelengthy Text" + JF + "Hi" + JB + \
"Lets replace it again" + JF + "Blah" + JF + JB*2 + JF "Lets replace it again" + JF + "Blah" + JF + JB*2 + JF
wanted = "hallo Blah Lets replace it again" wanted = "hallo Blah Lets replace it again" + JB*2 + JF
class TabStopTestMultilineExpand_ExceptCorrectResult(_VimTest): class TabStopTestMultilineExpand_ExceptCorrectResult(_VimTest):
snippets = ("hallo", "hallo $0\nnice $1 work\n$3 $2\nSeem to work") snippets = ("hallo", "hallo $0\nnice $1 work\n$3 $2\nSeem to work")
keys ="test hallo World" + ESC + "02f i" + EX + "world" + JF + "try" + \ keys ="test hallo World" + ESC + "02f i" + EX + "world" + JF + "try" + \
JF + "test" + JF + "one more" + JF + JF JF + "test" + JF + "one more" + JF
wanted = "test hallo one more\nnice world work\n" \ wanted = "test hallo one more" + JF + "\nnice world work\n" \
"test try\nSeem to work World" "test try\nSeem to work World"
class TabStop_TSInDefaultTextRLExample_OverwriteNone_ECR(_VimTest): class TabStop_TSInDefaultTextRLExample_OverwriteNone_ECR(_VimTest):
@ -1185,12 +1185,12 @@ snip.rv = "nothing"` `!p snip.rv = a
class PythonCode_LongerTextThanSource_Chars(_VimTest): class PythonCode_LongerTextThanSource_Chars(_VimTest):
snippets = ("test", r"""hi`!p snip.rv = "a" * 100`end""") snippets = ("test", r"""hi`!p snip.rv = "a" * 100`end""")
keys = """test""" + EX + JF + "ups" keys = """test""" + EX + "ups"
wanted = "hi" + 100*"a" + "endups" wanted = "hi" + 100*"a" + "endups"
class PythonCode_LongerTextThanSource_MultiLine(_VimTest): class PythonCode_LongerTextThanSource_MultiLine(_VimTest):
snippets = ("test", r"""hi`!p snip.rv = "a" * 100 + '\n'*100 + "a"*100`end""") snippets = ("test", r"""hi`!p snip.rv = "a" * 100 + '\n'*100 + "a"*100`end""")
keys = """test""" + EX + JF + "ups" keys = """test""" + EX + "ups"
wanted = "hi" + 100*"a" + 100*"\n" + 100*"a" + "endups" wanted = "hi" + 100*"a" + 100*"\n" + 100*"a" + "endups"
class PythonCode_AccessKilledTabstop_OverwriteSecond(_VimTest): class PythonCode_AccessKilledTabstop_OverwriteSecond(_VimTest):
@ -2762,8 +2762,8 @@ class Undo_RemoveWholeSnippet(_VimTest):
wanted = "first line\n\n\nupsy\n\n\nthird line" wanted = "first line\n\n\nupsy\n\n\nthird line"
class JumpForward_DefSnippet(_VimTest): class JumpForward_DefSnippet(_VimTest):
snippets = ("test", "${1}\n`!p snip.rv = '\\n'.join(t[1].split())`\n\n${0:pass}") snippets = ("test", "${1}\n`!p snip.rv = '\\n'.join(t[1].split())`\n\n${0:pass}")
keys = "test" + EX + "a b c" + JF + "shallnot" + JF + "end" keys = "test" + EX + "a b c" + JF + "shallnot"
wanted = "a b c\na\nb\nc\n\nshallnotend" wanted = "a b c\na\nb\nc\n\nshallnot"
class DeleteSnippetInsertion0(_VimTest): class DeleteSnippetInsertion0(_VimTest):
snippets = ("test", "${1:hello} $1") snippets = ("test", "${1:hello} $1")
keys = "test" + EX + ESC + "Vkx" + "i\nworld\n" keys = "test" + EX + ESC + "Vkx" + "i\nworld\n"