Mercurial > vim
comparison src/testdir/test_vim9_builtin.vim @ 24258:8b4159943d9a v8.2.2670
patch 8.2.2670: Vim9: error for append(0, text)
Commit: https://github.com/vim/vim/commit/b2ac7d0663ef31a335c50c6afca042ed9ace5059
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 28 15:46:16 2021 +0200
patch 8.2.2670: Vim9: error for append(0, text)
Problem: Vim9: error for append(0, text).
Solution: Check for negative number. (closes https://github.com/vim/vim/issues/8022)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 28 Mar 2021 16:00:03 +0200 |
parents | 0868ac82ef18 |
children | 21c72f782ae1 |
comparison
equal
deleted
inserted
replaced
24257:952600bbf45c | 24258:8b4159943d9a |
---|---|
121 var res1: number = append(1, 'one') | 121 var res1: number = append(1, 'one') |
122 assert_equal(0, res1) | 122 assert_equal(0, res1) |
123 var res2: bool = append(3, 'two') | 123 var res2: bool = append(3, 'two') |
124 assert_equal(false, res2) | 124 assert_equal(false, res2) |
125 assert_equal(['0', 'one', '1', 'two', '2'], getline(1, 6)) | 125 assert_equal(['0', 'one', '1', 'two', '2'], getline(1, 6)) |
126 | |
127 append(0, 'zero') | |
128 assert_equal('zero', getline(1)) | |
129 bwipe! | |
126 enddef | 130 enddef |
127 | 131 |
128 def Test_balloon_show() | 132 def Test_balloon_show() |
129 CheckGui | 133 CheckGui |
130 CheckFeature balloon_eval | 134 CheckFeature balloon_eval |