Skip to content

Commit ba9aed4

Browse files
committed
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 <[email protected]>
1 parent b583eda commit ba9aed4

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

src/testdir/test_startup.vim

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,5 +1351,25 @@ func Test_rename_buffer_on_startup()
13511351
call delete('Xresult')
13521352
endfunc
13531353

1354+
" Test that -cq works as expected
1355+
func Test_cq_zero_exmode()
1356+
let logfile = 'Xcq_log.txt'
1357+
let out = system(GetVimCommand() .. ' --clean --log ' .. logfile .. ' -es -X -c "argdelete foobar" -c"7cq"')
1358+
call assert_equal(8, v:shell_error)
1359+
let log = filter(readfile(logfile), {idx, val -> val =~ "E480"})
1360+
call assert_match('E480: No match: foobar', log[0])
1361+
call delete(logfile)
1362+
1363+
" wrap-around on Unix
1364+
let out = system(GetVimCommand() .. ' --clean --log ' .. logfile .. ' -es -X -c "argdelete foobar" -c"255cq"')
1365+
if !has('win32')
1366+
call assert_equal(0, v:shell_error)
1367+
else
1368+
call assert_equal(256, v:shell_error)
1369+
endif
1370+
let log = filter(readfile(logfile), {idx, val -> val =~ "E480"})
1371+
call assert_match('E480: No match: foobar', log[0])
1372+
call delete('Xcq_log.txt')
1373+
endfunc
13541374

13551375
" vim: shiftwidth=2 sts=2 expandtab

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
2023,
707709
/**/
708710
2022,
709711
/**/

0 commit comments

Comments
 (0)