Nikolay Pavlov wrote:
> I think that assert_fails(command, exception_pattern[, message]) would
> be more practical: I mean a function which executes command given as
> an argument and intercepts exceptions from it, failing if there was no
> exception or if exception did not match, so that your example is one
> line only:
>
> call assert_fails('commandthatfails', '\V\^Vim:E492:')
For simple commands this works. However, one has to put the command
inside a string. That gets a bit more complicated when escaping is
required. In most current use it's simple enough.
--
Eye have a spelling checker, it came with my PC;
It plainly marks four my revue mistakes I cannot sea.
I've run this poem threw it, I'm sure your please to no,
It's letter perfect in it's weigh, my checker tolled me sew!
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.