From: Muraoka Taro Date: Tue, 16 Dec 2025 18:51:26 +0000 (+0100) Subject: patch 9.1.1985: tests: test_sound.vim fails on Windows X-Git-Tag: v9.1.1985^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=878d00bb3a415ba71593ee798f642120e5e17a74;p=thirdparty%2Fvim.git 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 Signed-off-by: Christian Brabandt closes: #18941 --- diff --git a/src/testdir/test_sound.vim b/src/testdir/test_sound.vim index fba904c1dd..852b5931da 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 7539181d91..27c364c1b7 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, /**/