diff src/testdir/test_sound.vim @ 24842:237dace53473 v8.2.2959

patch 8.2.2959: sound_playfile() is not tested on MS-Windows Commit: https://github.com/vim/vim/commit/2f9c209ba089d81fd727122bbe0ae1da00585d80 Author: Dominique Pelle <dominique.pelle@gmail.com> Date: Mon Jun 7 20:28:45 2021 +0200 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 https://github.com/vim/vim/issues/8338)
author Bram Moolenaar <Bram@vim.org>
date Mon, 07 Jun 2021 20:30:03 +0200
parents a9ffc9154b32
children 71137f73c94d
line wrap: on
line diff
--- a/src/testdir/test_sound.vim
+++ b/src/testdir/test_sound.vim
@@ -75,17 +75,15 @@ func Test_play_silent()
 endfunc
 
 func Test_play_event_error()
-  " Do not run test on Windows as:
-  " - playing event with callback is not supported on Windows.
-  " - 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(test_null_string()))
-  call assert_equal(0, sound_playevent('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_function()))
+  " FIXME: sound_playevent() doesn't return 0 in case of error on Windows.
+  if !has('win32')
+    call assert_equal(0, sound_playevent(''))
+    call assert_equal(0, sound_playevent(test_null_string()))
+    call assert_equal(0, sound_playevent('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_function()))
+  endif
 
   call assert_equal(0, sound_playfile(''))
   call assert_equal(0, sound_playfile(test_null_string()))