From 5dba8710f78744599441ee096085aa861936f935 Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Tue, 7 Jul 2009 10:27:05 +0200 Subject: [PATCH] Added tests for tabstops in tabstops --- plugin/PySnipEmu.py | 3 --- test.py | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/plugin/PySnipEmu.py b/plugin/PySnipEmu.py index 99b66da..2022676 100644 --- a/plugin/PySnipEmu.py +++ b/plugin/PySnipEmu.py @@ -820,8 +820,6 @@ class SnippetManager(object): self._current_snippets.pop() return True - # else: - # vim.command(":au CursorMoved * py PySnipSnippets.normal_mode_moved()") self._vstate.update() self._accept_input = True @@ -870,7 +868,6 @@ class SnippetManager(object): if s is not None: self._current_snippets.append(s) self._accept_input = True - # vim.command(":au CursorMoved * py PySnipSnippets.normal_mode_moved()") return True diff --git a/test.py b/test.py index c006ed5..ac264ed 100755 --- a/test.py +++ b/test.py @@ -225,6 +225,38 @@ class TabStopTestMultilineExpand_ExceptCorrectResult(_VimTest): wanted = "test hallo one more\nnice world work\n" \ "test try\nSeem to work World" + +class TabStop_TSInDefaultTextRLExample_OverwriteNone_ECR(_VimTest): + snippets = ("test", """\n $0\n""") + keys = "test\t" + wanted = """
\n \n
""" +class TabStop_TSInDefaultTextRLExample_OverwriteFirst(_VimTest): + snippets = ("test", """\n $0\n""") + keys = "test\t blah\tHallo" + wanted = """
\n Hallo\n
""" +class TabStop_TSInDefaultTextRLExample_DeleteFirst(_VimTest): + snippets = ("test", """\n $0\n""") + keys = "test\t" + BS + "tHallo" + wanted = """
\n Hallo\n
""" +class TabStop_TSInDefaultTextRLExample_OverwriteFirstJumpBack(_VimTest): + snippets = ("test", """\n $3 $0\n""") + keys = "test\tHi\ttHallo+SomethingElse\tNupl\tNox" + wanted = """\n Nulp Nox\n""" +class TabStop_TSInDefaultTextRLExample_OverwriteSecond(_VimTest): + snippets = ("test", """\n $0\n""") + keys = "test\t\tno\tEnd" + wanted = """
\n End\n
""" +class TabStop_TSInDefaultTextRLExample_OverwriteSecondTabBack(_VimTest): + snippets = ("test", """\n $3 $0\n""") + keys = "test\t\tno\tEnd+yes\tBegin\tHi" + wanted = """
\n Begin Hi\n
""" +class TabStop_TSInDefaultTextRLExample_OverwriteSecondTabBackTwice(_VimTest): + snippets = ("test", """\n $3 $0\n""") + keys = "test\t\tno\tEnd+yes+ allaway\tThird\tLast" + wanted = """
\n Third Last\n
""" + + + print "expand, jump forward, jump backwards should all be individual" print "Shell eval snippets" print "Tabstop in default text of tabstop. Like in Ruby Dir snippet in TextMate"