Dan Kegel : winmm/tests: Test mciSendString with non-null return string buffer.
Alexandre Julliard
julliard at winehq.org
Wed Jul 23 07:10:09 CDT 2008
Module: wine
Branch: master
Commit: 6f164d504b966a8c67db68497e1c11473e583dbc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6f164d504b966a8c67db68497e1c11473e583dbc
Author: Dan Kegel <dank at kegel.com>
Date: Fri Jul 18 18:56:45 2008 -0700
winmm/tests: Test mciSendString with non-null return string buffer.
---
dlls/winmm/tests/mci.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c
index 6af062b..90a185f 100644
--- a/dlls/winmm/tests/mci.c
+++ b/dlls/winmm/tests/mci.c
@@ -28,7 +28,9 @@ START_TEST(mci)
const char command_open[] = "open new type waveaudio alias mysound";
const char command_close_my[] = "close mysound notify";
const char command_close_all[] = "close all notify";
+ const char command_sysinfo[] = "sysinfo waveaudio quantity open";
MSG msg;
+ char buf[1024];
err = mciSendString(command_open, NULL, 0, NULL);
ok(!err,"mciSendString(%s, NULL, 0 , NULL) returned error: %d\n", command_open, err);
@@ -44,6 +46,16 @@ START_TEST(mci)
err = mciSendString(command_close_all, NULL, 0, NULL);
todo_wine ok(!err,"mciSendString(%s, NULL, 0 , NULL) returned error: %d\n", command_close_all, err);
+ memset(buf, 0, sizeof(buf));
+ err = mciSendString(command_close_all, buf, sizeof(buf), NULL);
+ todo_wine ok(!err,"mciSendString(%s, buf, sizeof(buf) , NULL) returned error: %d\n", command_close_all, err);
+ todo_wine ok(buf[0] == 0, "mciSendString(%s, buf, sizeof(buf) , NULL) changed output buffer: %s\n", command_close_all, buf);
+
+ memset(buf, 0, sizeof(buf));
+ err = mciSendString(command_sysinfo, buf, sizeof(buf), NULL);
+ ok(!err,"mciSendString(%s, buf, sizeof(buf) , NULL) returned error: %d\n", command_sysinfo, err);
+ todo_wine ok(buf[0] == '0' && buf[1] == 0, "mciSendString(%s, buf, sizeof(buf) , NULL), expected output buffer '0', got: '%s'\n", command_sysinfo, buf);
+
err = mciSendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_NOTIFY, 0);
todo_wine ok(err == MCIERR_INVALID_DEVICE_ID,
"mciSendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_NOTIFY, NULL) returned %d instead of %d\n",
More information about the wine-cvs
mailing list