From 3584ee3421bf8d5c72de8273f623f1ad08b18b2a Mon Sep 17 00:00:00 2001 From: Aaron Schrab Date: Thu, 9 Aug 2012 13:09:49 -0400 Subject: [PATCH] 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. --- test.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test.py b/test.py index fcb4aeb..06cb7af 100755 --- a/test.py +++ b/test.py @@ -2543,6 +2543,23 @@ class Fold_DeleteMiddleLine_ECR(_VimTest): # End: $1 `!p snip.rv = vim.eval("&foldmarker").split(",")[1]`""") keys = "fold" + EX + "hi" + ESC + "jdd" 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 #}}} # Cursor Movement {{{#