Mercurial > vim
comparison src/testdir/test_perl.vim @ 34234:daaff6843090 v9.1.0062
patch 9.1.0062: Internal error when :luado/perldo/pydo etc delete lines
Commit: https://github.com/vim/vim/commit/e99f0688785c3d56b1ee45a28fa6ce02b850a33b
Author: zeertzjq <zeertzjq@outlook.com>
Date: Mon Jan 29 19:32:39 2024 +0100
patch 9.1.0062: Internal error when :luado/perldo/pydo etc delete lines
Problem: Internal error when :luado/perldo/pydo etc delete lines
Solution: Test that the line is still valid line number
(zeertzjq)
closes: #13931
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 29 Jan 2024 19:45:06 +0100 |
parents | 029c59bf78f1 |
children |
comparison
equal
deleted
inserted
replaced
34233:a2c41411d97b | 34234:daaff6843090 |
---|---|
209 perldo s/perl/vieux_chameau/g | 209 perldo s/perl/vieux_chameau/g |
210 1 | 210 1 |
211 call assert_false(search('\Cperl')) | 211 call assert_false(search('\Cperl')) |
212 bw! | 212 bw! |
213 | 213 |
214 new | |
215 | |
214 " Check deleting lines does not trigger ml_get error. | 216 " Check deleting lines does not trigger ml_get error. |
215 new | |
216 call setline(1, ['one', 'two', 'three']) | 217 call setline(1, ['one', 'two', 'three']) |
217 perldo VIM::DoCommand("%d_") | 218 perldo VIM::DoCommand("%d_") |
219 call assert_equal([''], getline(1, '$')) | |
220 | |
221 call setline(1, ['one', 'two', 'three']) | |
222 perldo VIM::DoCommand("1,2d_") | |
223 call assert_equal(['three'], getline(1, '$')) | |
224 | |
225 call setline(1, ['one', 'two', 'three']) | |
226 perldo VIM::DoCommand("2,3d_"); $_ = "REPLACED" | |
227 call assert_equal(['REPLACED'], getline(1, '$')) | |
228 | |
229 call setline(1, ['one', 'two', 'three']) | |
230 2,3perldo VIM::DoCommand("1,2d_"); $_ = "REPLACED" | |
231 call assert_equal(['three'], getline(1, '$')) | |
232 | |
218 bwipe! | 233 bwipe! |
219 | 234 |
220 " Check a Perl expression which gives an error. | 235 " Check a Perl expression which gives an error. |
221 new | 236 new |
222 call setline(1, 'one') | 237 call setline(1, 'one') |