From 4e287753709b33ddee03a866c2c6787b9b17da25 Mon Sep 17 00:00:00 2001 From: wjiang Date: Mon, 28 Apr 2025 08:54:01 +0800 Subject: [PATCH] enable check and fix some tests failed --- ...-patch-9.1.1120-Test_registers-fails.patch | 26 +++++++++++++++++++ vim-8.0-copy-paste.patch | 12 +++++++++ vim.spec | 12 ++++++++- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 backport-patch-9.1.1120-Test_registers-fails.patch diff --git a/backport-patch-9.1.1120-Test_registers-fails.patch b/backport-patch-9.1.1120-Test_registers-fails.patch new file mode 100644 index 0000000..3b7bc79 --- /dev/null +++ b/backport-patch-9.1.1120-Test_registers-fails.patch @@ -0,0 +1,26 @@ +From 44c1c04ddb000bd03c6e8851dcdef07fd8c329ff Mon Sep 17 00:00:00 2001 +From: Christian Brabandt +Date: Mon, 17 Feb 2025 22:26:00 +0100 +Subject: [PATCH] patch 9.1.1120: tests: Test_registers fails + +Problem: tests: Test_registers fails + (T.J. Townsend, after v9.1.1115) +Solution: require clipboard feature + +Signed-off-by: Christian Brabandt +--- + src/testdir/test_registers.vim | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/testdir/test_registers.vim b/src/testdir/test_registers.vim +index 13127022666e04..ee59ecb3042300 100644 +--- a/src/testdir/test_registers.vim ++++ b/src/testdir/test_registers.vim +@@ -931,6 +931,7 @@ endfunc + + " This caused use-after-free + func Test_register_redir_display() ++ CheckFeature clipboard + " don't touch the clipboard, so only perform this, when the clipboard is not working + if has("clipboard_working") + throw "Skipped: skip touching the clipboard register!" diff --git a/vim-8.0-copy-paste.patch b/vim-8.0-copy-paste.patch index bd5bbd4..8249ae3 100644 --- a/vim-8.0-copy-paste.patch +++ b/vim-8.0-copy-paste.patch @@ -33,6 +33,18 @@ index ed0c6c1..90c8c40 100644 call setline(1, ["one one one", "two tXo two", "three three three"]) set balloonevalterm balloonexpr=MyBalloonExpr()..s:trailing balloondelay=100 let s:trailing = '<' " check that script context is set +diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim +index d930133..0c74032 100644 +--- a/src/testdir/test_popup.vim ++++ b/src/testdir/test_popup.vim +@@ -945,6 +945,7 @@ func Test_mouse_popup_position() + let script =<< trim END + set mousemodel=popup_setpos + source $VIMRUNTIME/menu.vim ++ set mouse=a + call setline(1, join(range(20))) + func Trigger(col) + call test_setmouse(1, a:col) diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim index b91689e..c6b70d1 100644 --- a/src/testdir/test_popupwin.vim diff --git a/vim.spec b/vim.spec index 4ee676a..245ac2a 100644 --- a/vim.spec +++ b/vim.spec @@ -10,7 +10,7 @@ Name: vim Epoch: 2 Version: %{baseversion}.%{patchlevel} -Release: 4 +Release: 5 Summary: Vim is a highly configurable text editor for efficiently creating and changing any kind of text. License: Vim AND LGPL-2.1-or-later AND MIT AND GPL-1.0-only AND (GPL-2.0-only OR Vim) AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-or-later AND GPL-3.0-or-later AND OPUBL-1.0 AND Apache-2.0 WITH Swift-exception URL: https://www.vim.org @@ -28,6 +28,7 @@ Patch6000: backport-CVE-2025-24014.patch Patch6001: backport-CVE-2025-1215.patch Patch6002: backport-CVE-2025-26603.patch Patch6003: backport-CVE-2025-29768.patch +Patch6004: backport-patch-9.1.1120-Test_registers-fails.patch BuildRequires: autoconf python3-devel ncurses-devel gettext perl-devel perl-generators gcc BuildRequires: perl(ExtUtils::Embed) perl(ExtUtils::ParseXS) libacl-devel gpm-devel file @@ -327,6 +328,12 @@ popd > %{_datadir}/%{name}/vimfiles/doc/tags || : %{_bindir}/vim -c ":helptags %{_datadir}/%{name}/vimfiles/doc" -c :q &> /dev/null || : +%check +export TERM=xterm +# Run glvs tests requires Internet, but most build env don't have. Skip them +export TEST_SKIP_PAT=Test_glvs +LC_ALL=en_US.UTF-8 make -j1 test || echo "Warning: Please check tests." + %files common %license LICENSE %doc README* @@ -419,6 +426,9 @@ popd %{_mandir}/man1/evim.* %changelog +* Fri Apr 25 2025 wangjiang - 2:9.1.1019-5 +- enable check and fix some tests failed + * Tue Mar 18 2025 wangjiang - 2:9.1.1019-4 - fix CVE-2025-29768 -- Gitee