mirror of
https://github.com/vim/vim.git
synced 2025-10-25 09:04:09 -04:00
patch 8.2.2959: sound_playfile() is not tested on MS-Windows
Problem: sound_playfile() is not tested on MS-Windows. Solution: Make it work and enable the test. (Dominique Pellé, closes #8338)
This commit is contained in:
committed by
Bram Moolenaar
parent
f7a023e580
commit
2f9c209ba0
@@ -355,10 +355,9 @@ f_sound_playevent(typval_T *argvars, typval_T *rettv)
|
|||||||
if (wp == NULL)
|
if (wp == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PlaySoundW(wp, NULL, SND_ASYNC | SND_ALIAS);
|
if (PlaySoundW(wp, NULL, SND_ASYNC | SND_ALIAS))
|
||||||
free(wp);
|
|
||||||
|
|
||||||
rettv->vval.v_number = ++sound_id;
|
rettv->vval.v_number = ++sound_id;
|
||||||
|
free(wp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -75,17 +75,15 @@ func Test_play_silent()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_play_event_error()
|
func Test_play_event_error()
|
||||||
" Do not run test on Windows as:
|
" FIXME: sound_playevent() doesn't return 0 in case of error on Windows.
|
||||||
" - playing event with callback is not supported on Windows.
|
if !has('win32')
|
||||||
" - FIXME: even without callback, sound_playevent('') does not return 0 on Windows. Bug?
|
|
||||||
CheckNotMSWindows
|
|
||||||
|
|
||||||
call assert_equal(0, sound_playevent(''))
|
call assert_equal(0, sound_playevent(''))
|
||||||
call assert_equal(0, sound_playevent(test_null_string()))
|
call assert_equal(0, sound_playevent(test_null_string()))
|
||||||
call assert_equal(0, sound_playevent('doesnotexist'))
|
call assert_equal(0, sound_playevent('doesnotexist'))
|
||||||
call assert_equal(0, sound_playevent('doesnotexist', 'doesnotexist'))
|
call assert_equal(0, sound_playevent('doesnotexist', 'doesnotexist'))
|
||||||
call assert_equal(0, sound_playevent(test_null_string(), test_null_string()))
|
call assert_equal(0, sound_playevent(test_null_string(), test_null_string()))
|
||||||
call assert_equal(0, sound_playevent(test_null_string(), test_null_function()))
|
call assert_equal(0, sound_playevent(test_null_string(), test_null_function()))
|
||||||
|
endif
|
||||||
|
|
||||||
call assert_equal(0, sound_playfile(''))
|
call assert_equal(0, sound_playfile(''))
|
||||||
call assert_equal(0, sound_playfile(test_null_string()))
|
call assert_equal(0, sound_playfile(test_null_string()))
|
||||||
|
|||||||
@@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2959,
|
||||||
/**/
|
/**/
|
||||||
2958,
|
2958,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user