Add test with perl syntax folding

Exercise changes from commit 7335225, to check that the problem fixed by
that doesn't recur.

I've run all tests including this one both with and without the
previously mentioned commit, the new test only passes if that commit is
included.  All other tests pass in either case.
This commit is contained in:
Aaron Schrab 2012-08-09 13:09:49 -04:00
parent 73352257e4
commit 3584ee3421

17
test.py
View File

@ -2543,6 +2543,23 @@ class Fold_DeleteMiddleLine_ECR(_VimTest):
# End: $1 `!p snip.rv = vim.eval("&foldmarker").split(",")[1]`""") # End: $1 `!p snip.rv = vim.eval("&foldmarker").split(",")[1]`""")
keys = "fold" + EX + "hi" + ESC + "jdd" keys = "fold" + EX + "hi" + ESC + "jdd"
wanted = "# hi {{{\n\n# End: hi }}}" wanted = "# hi {{{\n\n# End: hi }}}"
class PerlSyntaxFold(_VimTest):
def _options_on(self):
self.send(":set foldlevel=0\n")
self.send(":syntax enable\n")
self.send(":set foldmethod=syntax\n")
self.send(":let g:perl_fold = 1\n")
self.send(":so $VIMRUNTIME/syntax/perl.vim\n")
def _options_off(self):
self.send(":set foldmethod=manual\n")
self.send(":syntax clear\n")
snippets = ("test", r"""package ${1:`!v printf('c%02d', 3)`};
${0}
1;""")
keys = "test" + EX + JF + "sub junk {}"
wanted = "package c03;\nsub junk {}\n1;"
# End: Folding Interaction #}}} # End: Folding Interaction #}}}
# Cursor Movement {{{# # Cursor Movement {{{#