fix some tests failed

This commit is contained in:
wjiang 2025-04-25 16:45:32 +08:00
parent 86020ebe48
commit 0e901b9ac0
No known key found for this signature in database
GPG Key ID: 0C5FFAB43143735C
6 changed files with 182 additions and 1 deletions

View File

@ -0,0 +1,49 @@
From c8a582aad5bd22eaf852e82d07ea91fe183b4cc6 Mon Sep 17 00:00:00 2001
From: Ken Takata <kentkt@csc.jp>
Date: Sat, 20 Jul 2024 11:55:13 +0200
Subject: [PATCH] patch 9.1.0606: tests: generated files may cause failure in
test_codestyle
Problem: tests: generated files may cause failure in test_codestyle
Solution: Exclude OLE-related generated files from style checks.
(Ken Takata)
Some OLE-related auto-generated files may contain space errors:
https://ci.appveyor.com/project/chrisbra/vim-win32-installer/builds/50248542/job/w45ve9yd6qmmws8t#L11475
```
From test_codestyle.vim:
Found errors in Test_source_files():
command line..script C:/projects/vim-win32-installer/vim/src/testdir/runtest.vim[607]..function RunTheTest[57]..Test_source_files[8]..<SNR>8_PerformCheck[11]..<SNR>8_ReportError line 2: ../dlldata.c line 2: trailing white space
command line..script C:/projects/vim-win32-installer/vim/src/testdir/runtest.vim[607]..function RunTheTest[57]..Test_source_files[8]..<SNR>8_PerformCheck[11]..<SNR>8_ReportError line 2: ../iid_ole.c line 12: trailing white space
command line..script C:/projects/vim-win32-installer/vim/src/testdir/runtest.vim[607]..function RunTheTest[57]..Test_source_files[6]..<SNR>8_PerformCheck[11]..<SNR>8_ReportError line 2: ../if_ole.h line 60: space before Tab
command line..script C:/projects/vim-win32-installer/vim/src/testdir/runtest.vim[607]..function RunTheTest[57]..Test_source_files[8]..<SNR>8_PerformCheck[11]..<SNR>8_ReportError line 2: ../if_ole.h line 10: trailing white space
```
Exclude them from style checking.
closes: #15309
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
---
src/testdir/test_codestyle.vim | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/testdir/test_codestyle.vim b/src/testdir/test_codestyle.vim
index 58ccb6abba66f..83f52ef34cd60 100644
--- a/src/testdir/test_codestyle.vim
+++ b/src/testdir/test_codestyle.vim
@@ -24,6 +24,13 @@ def Test_source_files()
g:ignoreSwapExists = 'e'
exe 'edit ' .. fname
+ # Some files are generated files and may contain space errors.
+ if fname =~ 'dlldata.c'
+ || fname =~ 'if_ole.h'
+ || fname =~ 'iid_ole.c'
+ continue
+ endif
+
PerformCheck(fname, ' \t', 'space before Tab', '')
PerformCheck(fname, '\s$', 'trailing white space', '')

View File

@ -0,0 +1,35 @@
From fb3f9699362f8d51c3b48fcaea1eb2ed16c81454 Mon Sep 17 00:00:00 2001
From: Christian Brabandt <cb@256bit.org>
Date: Sun, 11 Aug 2024 20:09:17 +0200
Subject: [PATCH] Problem: crash with WinNewPre autocommand
Problem: crash with WinNewPre autocommand, because window
structures are not yet safe to use
Solution: Don't trigger WinNewPre on :tabnew
Signed-off-by: Christian Brabandt <cb@256bit.org>
---
src/testdir/test_autocmd.vim | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim
index e251112..3df3af1 100644
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -14,6 +14,13 @@ func s:cleanup_buffers() abort
endfor
endfunc
+func CleanUpTestAuGroup()
+ augroup testing
+ au!
+ augroup END
+ augroup! testing
+endfunc
+
func Test_vim_did_enter()
call assert_false(v:vim_did_enter)
--
2.33.0

View File

@ -0,0 +1,26 @@
From 44c1c04ddb000bd03c6e8851dcdef07fd8c329ff Mon Sep 17 00:00:00 2001
From: Christian Brabandt <cb@256bit.org>
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 <cb@256bit.org>
---
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!"

View File

@ -0,0 +1,35 @@
From 919addfdcd0ef3f7b662dc9e32beb1c4da3d77bf Mon Sep 17 00:00:00 2001
From: wjiang <app@cameyan.com>
Date: Thu, 3 Apr 2025 14:07:33 +0800
Subject: [PATCH] fix Test_autocmd_BufWinLeave_with_vsp
---
src/testdir/test_autocmd.vim | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim
index cea5e41..580a14d 100644
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -4325,8 +4325,6 @@ func Test_autocmd_BufWinLeave_with_vsp()
let dummy = 'XXXDummy.txt'
call writefile([], fname)
call writefile([], dummy)
- defer delete(fname)
- defer delete(dummy)
exe "e " fname
vsp
augroup testing
@@ -4335,6 +4333,9 @@ func Test_autocmd_BufWinLeave_with_vsp()
bw
call CleanUpTestAuGroup()
exe "bw! " .. dummy
+
+ call delete(fname)
+ call delete(dummy)
endfunc
" vim: shiftwidth=2 sts=2 expandtab
--
2.33.0

View File

@ -0,0 +1,25 @@
From d838e35ce79cf0b61e24bc417d86a449445b7a90 Mon Sep 17 00:00:00 2001
From: wjiang <app@cameyan.com>
Date: Fri, 25 Apr 2025 16:16:43 +0800
Subject: [PATCH] 444444444444444
---
src/version.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/version.c b/src/version.c
index 286a45f..96c0e1c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,7 +704,7 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
-/**/
+/**/
679,
/**/
678,
--
2.43.0

View File

@ -14,7 +14,7 @@
Name: vim
Epoch: 2
Version: %{baseversion}.%{patchlevel}
Release: 18
Release: 19
Summary: Vim is a highly configurable text editor for efficiently creating and changing any kind of text.
License: Vim and MIT
URL: http://www.vim.org
@ -63,9 +63,14 @@ Patch6028: backport-runtime-escape-on-Unix-as-well.patch
Patch6029: backport-runtime-Fix-for-FreeBSD-unzip-command.patch
Patch6030: backport-runtime-zip-plugin-has-problems-with-special.patch
Patch6031: backport-CVE-2025-29768.patch
Patch6032: backport-patch-9.1.0671-crash-with-WinNewPre-autocommand.patch
Patch6033: backport-patch-9.1.0606-generated-files-may-cause-failure-in-test_codestyle.patch
Patch6034: backport-patch-9.1.1120-Test_registers-fails.patch
Patch9000: bugfix-rm-modify-info-version.patch
Patch9001: fix-CVE-2024-47814.patch
Patch9002: fixed-autocmd_BufWinLeave_with_vsp.patch
Patch9003: fixed-test-failed-Test_register_redir_display.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
@ -471,6 +476,12 @@ LC_ALL=en_US.UTF-8 make -j1 test || echo "Warning: Please check tests."
%{_mandir}/man1/evim.*
%changelog
* Fri Apr 25 2025 wangjiang <app@cameyan.com> - 2:9.0.2092-19
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix some tests failed
* Tue Mar 18 2025 wangjiang <app@cameyan.com> - 2:9.0.2092-18
- Type:CVE
- ID:CVE-2025-29768