Added a test for tabstops in multiple lines

This commit is contained in:
Holger Rapp 2009-07-01 20:22:12 +02:00
parent 526617a529
commit 4f6d54335f

23
test.py
View File

@ -107,28 +107,19 @@ class ExpandInTheMiddleOfLine_ExceptCorrectResult(_SimpleExpands):
self.assertEqual(self.output,"Wie Hallo Welt! gehts?") self.assertEqual(self.output,"Wie Hallo Welt! gehts?")
class MultilineExpand_ExceptCorrectResult(_VimTest): class MultilineExpand_ExceptCorrectResult(_VimTest):
snippets = ( snippets = ("hallo", "Hallo Welt!\nUnd Wie gehts?")
("hallo", "Hallo Welt!\nUnd Wie gehts?"),
)
def cmd(self): def cmd(self):
self.type("Wie hallo gehts?") self.type("Wie hallo gehts?")
self.escape() self.escape()
self.type("bhi\t") self.type("bhi\t")
def runTest(self): def runTest(self):
self.assertEqual(self.output, "Wie Hallo Welt!\nUnd Wie gehts? gehts?") self.assertEqual(self.output, "Wie Hallo Welt!\nUnd Wie gehts? gehts?")
class MultilineExpandTestTyping_ExceptCorrectResult(_VimTest): class MultilineExpandTestTyping_ExceptCorrectResult(_VimTest):
snippets = ( snippets = ("hallo", "Hallo Welt!\nUnd Wie gehts?")
("hallo", "Hallo Welt!\nUnd Wie gehts?"),
)
def cmd(self): def cmd(self):
self.type("Wie hallo gehts?") self.type("Wie hallo gehts?")
self.escape() self.escape()
self.type("bhi\tHuiui!") self.type("bhi\tHuiui!")
def runTest(self): def runTest(self):
self.assertEqual(self.output, self.assertEqual(self.output,
"Wie Hallo Welt!\nUnd Wie gehts?Huiui! gehts?") "Wie Hallo Welt!\nUnd Wie gehts?Huiui! gehts?")
@ -197,6 +188,16 @@ class TabStopTestBackwardJumping2_ExceptCorrectResult(_VimTest):
def runTest(self): def runTest(self):
self.assertEqual(self.output,"hallo Blah Lets replace it again") self.assertEqual(self.output,"hallo Blah Lets replace it again")
class TabStopTestMultilineExpand_ExceptCorrectResult(_VimTest):
snippets = ("hallo", "hallo $0\nnice $1 work\n$3 $2\nSeem to work")
def cmd(self):
self.type("test hallo World")
self.escape()
self.type("02f i\tworld\ttry\ttest\tone more\t\t")
def runTest(self):
self.assertEqual(self.output,
"test hallo one more\nnice world work\ntest try\nSeem to work World")
# TODO: pasting with <C-R> while mirroring # TODO: pasting with <C-R> while mirroring
########### ###########
# MIRRORS # # MIRRORS #