From 598fd77d952364d4dd3433425afe9798dac15206 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 16 Jul 2024 14:25:35 +0800 Subject: vim-patch:8.2.0183: tests fail when the float feature is disabled (#29738) Problem: Tests fail when the float feature is disabled. Solution: Skip tests that don't work without float support. https://github.com/vim/vim/commit/5feabe00c47fa66d5f4c95213f150488433f78e3 Cherry-pick Test_ruby_Vim_blob() from patch 8.1.0977 and skip it. Co-authored-by: Bram Moolenaar --- test/old/testdir/test_sort.vim | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'test/old/testdir/test_sort.vim') diff --git a/test/old/testdir/test_sort.vim b/test/old/testdir/test_sort.vim index 94a35e3cb5..dafa3f618f 100644 --- a/test/old/testdir/test_sort.vim +++ b/test/old/testdir/test_sort.vim @@ -1336,6 +1336,34 @@ func Test_sort_cmd() \ ] endif endif + if has('float') + let tests += [ + \ { + \ 'name' : 'float', + \ 'cmd' : 'sort f', + \ 'input' : [ + \ '1.234', + \ '0.88', + \ ' + 123.456', + \ '1.15e-6', + \ '-1.1e3', + \ '-1.01e3', + \ '', + \ '' + \ ], + \ 'expected' : [ + \ '', + \ '', + \ '-1.1e3', + \ '-1.01e3', + \ '1.15e-6', + \ '0.88', + \ '1.234', + \ ' + 123.456' + \ ] + \ }, + \ ] + endif for t in tests enew! -- cgit From f17d81933067c5356f1c8419218d61aaaec9046c Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 17 Jul 2024 09:24:52 +0800 Subject: vim-patch:partial:9.0.0719: too many delete() calls in tests Problem: Too many delete() calls in tests. Solution: Use deferred delete where possible. https://github.com/vim/vim/commit/56564964e6d0956c29687e8a10cb94fe42f5c097 This includes all changes expect changes in test_startup.vim. Co-authored-by: Bram Moolenaar --- test/old/testdir/test_sort.vim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/old/testdir/test_sort.vim') diff --git a/test/old/testdir/test_sort.vim b/test/old/testdir/test_sort.vim index dafa3f618f..2d03dd2f2a 100644 --- a/test/old/testdir/test_sort.vim +++ b/test/old/testdir/test_sort.vim @@ -1525,11 +1525,10 @@ func Test_sort_with_no_last_search_pat() call writefile(v:errors, 'Xresult') qall! [SCRIPT] - call writefile(lines, 'Xscript') + call writefile(lines, 'Xscript', 'D') if RunVim([], [], '--clean -S Xscript') call assert_equal([], readfile('Xresult')) endif - call delete('Xscript') call delete('Xresult') endfunc -- cgit