Christian wrote:
> On Do, 31 Okt 2019, Bram Moolenaar wrote:
>
> > + func Test_sub_beyond_end()
> > + new
> > + call setline(1, '#')
> > + let @/ = '^#\n\zs'
> > + s///e
> > + call assert_equal('#', getline(1))
> > + bwipe!
> > + endfunc
>
> Did this test fail before 8.1.2236?
Yes. Just tried again, without the fix the test fails (or hangs).
> I tried the same, but for some reason I couldn't get it to fail,
> unless I gave the substitute command on the command line. I then tried
> to simplify the test like this:
>
> diff --git a/src/testdir/test_substitute.vim b/src/testdir/test_substitute.vim
> index 8a8e7ab4f..24158b186 100644
> --- a/src/testdir/test_substitute.vim
> +++ b/src/testdir/test_substitute.vim
> @@ -716,3 +716,10 @@ one two
>
> close!
> endfunc
> +
> +func Test_substitute_endofline()
> + new
> + "call assert_fails(':s/\n\zs//', 'E486')
> + :s/\n\zs//
> + bw!
> +endfunc
>
>
> Which works now, but before 8.1.2236 it hangs, because the ml_get_error
> requires to press enter a few times.
>
> Tried the assert_fails(), but that does not throw E486 now, so the test
> now fails. Anyhow, I was just curious. I guess nothing to be done here.
--
hundred-and-one symptoms of being an internet addict:
12. You turn off your Wifi and get this awful empty feeling, like you just
pulled the plug on a loved one.
/// 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/201910311858.x9VIw68k017767%40masaka.moolenaar.net.