patch 9.0.2023: need more tests for :cq Commit: https://github.com/vim/vim/commit/ba9aed44975cc82290208fd45f35dd72fc66d6c1 Author: Christian Brabandt <c...@256bit.org> Date: Sat Oct 14 11:38:12 2023 +0200
patch 9.0.2023: need more tests for :cq Problem: need more tests for :cq Solution: Add more tests, including wraparound on linux Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim index 949553350..6780205a2 100644 --- a/src/testdir/test_startup.vim +++ b/src/testdir/test_startup.vim @@ -1351,5 +1351,25 @@ func Test_rename_buffer_on_startup() call delete('Xresult') endfunc +" Test that -cq works as expected +func Test_cq_zero_exmode() + let logfile = 'Xcq_log.txt' + let out = system(GetVimCommand() .. ' --clean --log ' .. logfile .. ' -es -X -c "argdelete foobar" -c"7cq"') + call assert_equal(8, v:shell_error) + let log = filter(readfile(logfile), {idx, val -> val =~ "E480"}) + call assert_match('E480: No match: foobar', log[0]) + call delete(logfile) + + " wrap-around on Unix + let out = system(GetVimCommand() .. ' --clean --log ' .. logfile .. ' -es -X -c "argdelete foobar" -c"255cq"') + if !has('win32') + call assert_equal(0, v:shell_error) + else + call assert_equal(256, v:shell_error) + endif + let log = filter(readfile(logfile), {idx, val -> val =~ "E480"}) + call assert_match('E480: No match: foobar', log[0]) + call delete('Xcq_log.txt') +endfunc " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index d84210888..8eb32e663 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2023, /**/ 2022, /**/ -- -- 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 vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1qrbCk-005AEV-Rz%40256bit.org.