patch 9.1.1985: tests: test_sound.vim fails on Windows
Commit:
https://github.com/vim/vim/commit/878d00bb3a415ba71593ee798f642120e5e17a74
Author: Muraoka Taro <
koron....@gmail.com>
Date: Tue Dec 16 19:51:26 2025 +0100
patch 9.1.1985: tests: test_sound.vim fails on Windows
Problem: tests: test_sound.vim fails when run locally on Windows
Solution: Skip Test_play_silent in Windows non-GUI environments.
Cause: There are two causes:
1) The global variable g:id is undefined, causing an undefined
reference. Due to the execution order of test cases, g:id is defined in
Test_play_event. However, on Windows, this test is skipped, so g:id is
not defined. It is referenced in Test_play_silent's WaitForAssert()
without being defined, resulting in an undefined error.
Solution: Define g:id at the beginning of Test_play_silent.
2) In the non-GUI Windows version of vim, there is no message loop,
so the callback when play file sound ends does not occur, and
Test_play_silent's WaitForAssert times out and fails. In CI,
sound_playfile() returns 0, so Test_play_silent is skipped. The
reason for this is unknown, but it may be because CI is running on
Windows Server or something like that.
Solution: Skip Test_play_silent in Windows non-GUI environments.
Signed-off-by: Muraoka Taro <
koron....@gmail.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
closes: #18941
diff --git a/src/testdir/test_sound.vim b/src/testdir/test_sound.vim
index fba904c1d..852b5931d 100644
--- a/src/testdir/test_sound.vim
+++ b/src/testdir/test_sound.vim
@@ -33,9 +33,14 @@ func Test_play_event()
endfunc
func Test_play_silent()
+ if has('win32') && !has('gui_running')
+ throw 'Skipped: Playing file with callback is not supported on Windows, non-GUI'
+ endif
+
let fname = fnamemodify('silent.wav', '%p')
let g:playcallback_count = 0
let g:result = -1
+ let g:id = 0
" play without callback
let id1 = sound_playfile(fname)
diff --git a/src/version.c b/src/version.c
index 7539181d9..27c364c1b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1985,
/**/
1984,
/**/