diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-02-05 11:13:05 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-02-05 11:13:05 +0000 |
commit | fc88df42f1ae64bcc4d6cbc0fbd3445f8c59afdf (patch) | |
tree | 72d864d9ae9b5c2ea1fcae50e9c0fb7b3859263b /src/testdir/test_vartabs.vim | |
parent | 21ebb0899ecf9049c3e1c9cbc2e06fd8e2a99e06 (diff) | |
download | vim-git-fc88df42f1ae64bcc4d6cbc0fbd3445f8c59afdf.tar.gz |
patch 8.2.4298: divide by zero with huge tabstop valuev8.2.4298
Problem: Divide by zero with huge tabstop value.
Solution: Reject tabstop value that overflows to zero.
Diffstat (limited to 'src/testdir/test_vartabs.vim')
-rw-r--r-- | src/testdir/test_vartabs.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/testdir/test_vartabs.vim b/src/testdir/test_vartabs.vim index 3b8a9ce0b..156233dca 100644 --- a/src/testdir/test_vartabs.vim +++ b/src/testdir/test_vartabs.vim @@ -146,6 +146,16 @@ func Test_vartabs() bwipeout! endfunc +func Test_retab_invalid_arg() + new + call setline(1, "\ttext") + retab 0 + call assert_fails("retab -8", 'E487: Argument must be positive') + call assert_fails("retab 10000", 'E475:') + call assert_fails("retab 720575940379279360", 'E475:') + bwipe! +endfunc + func Test_vartabs_breakindent() CheckOption breakindent new |