aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_quickfix.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-07 17:58:38 -0400
committerGitHub <noreply@github.com>2020-10-07 17:58:38 -0400
commit8ba5f4d19c6a2fa0de07a82867c52e68f5a757b7 (patch)
tree5ddaeeafab707b6e32b6c49615ddae498ac3fb29 /src/nvim/testdir/test_quickfix.vim
parenta260d5def363ca30f0473365ea514f2dedd0d0ba (diff)
parent670a577c6b7b6f950c738261937c2b6d55a7faec (diff)
downloadrneovim-8ba5f4d19c6a2fa0de07a82867c52e68f5a757b7.tar.gz
rneovim-8ba5f4d19c6a2fa0de07a82867c52e68f5a757b7.tar.bz2
rneovim-8ba5f4d19c6a2fa0de07a82867c52e68f5a757b7.zip
Merge pull request #13064 from janlazo/vim-8.1.2325
vim-patch:8.1.{1683,1686,1692,1705,2325},8.2.1599
Diffstat (limited to 'src/nvim/testdir/test_quickfix.vim')
-rw-r--r--src/nvim/testdir/test_quickfix.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index 42ca0fe1d3..520007a993 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -1597,6 +1597,24 @@ func Test_long_lines()
call s:long_lines_tests('l')
endfunc
+func Test_cgetfile_on_long_lines()
+ " Problematic values if the line is longer than 4096 bytes. Then 1024 bytes
+ " are read at a time.
+ for len in [4078, 4079, 4080, 5102, 5103, 5104, 6126, 6127, 6128, 7150, 7151, 7152]
+ let lines = [
+ \ '/tmp/file1:1:1:aaa',
+ \ '/tmp/file2:1:1:%s',
+ \ '/tmp/file3:1:1:bbb',
+ \ '/tmp/file4:1:1:ccc',
+ \ ]
+ let lines[1] = substitute(lines[1], '%s', repeat('x', len), '')
+ call writefile(lines, 'Xcqetfile.txt')
+ cgetfile Xcqetfile.txt
+ call assert_equal(4, getqflist(#{size: v:true}).size, 'with length ' .. len)
+ endfor
+ call delete('Xcqetfile.txt')
+endfunc
+
func s:create_test_file(filename)
let l = []
for i in range(1, 20)