Nikolay Sivov : msxml3/tests: Really test load() on files with leading spaces.
Alexandre Julliard
julliard at winehq.org
Wed May 9 13:46:19 CDT 2012
Module: wine
Branch: master
Commit: 9c0486d7a802c2f618a56a2074c5d790d329e3cf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9c0486d7a802c2f618a56a2074c5d790d329e3cf
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Wed May 9 20:30:58 2012 +0400
msxml3/tests: Really test load() on files with leading spaces.
---
dlls/msxml3/tests/domdoc.c | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c
index 09165c3..2aa2906 100644
--- a/dlls/msxml3/tests/domdoc.c
+++ b/dlls/msxml3/tests/domdoc.c
@@ -2061,8 +2061,12 @@ static void test_domdoc( void )
LONG code, ref;
LONG nLength = 0;
WCHAR buff[100];
+ char path[MAX_PATH];
int index;
+ GetTempPathA(MAX_PATH, path);
+ strcat(path, "leading_spaces.xml");
+
/* Load document with leading spaces
*
* Test all CLSIDs with all test data XML strings
@@ -2087,13 +2091,24 @@ static void test_domdoc( void )
i = 0;
while (*data_ptr) {
BSTR data = _bstr_(*data_ptr);
+ DWORD written;
+ HANDLE file;
+
+ file = CreateFileA(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL );
+ ok(file != INVALID_HANDLE_VALUE, "can't create file %s: %u\n", path, GetLastError());
+
+ WriteFile(file, data, lstrlenW(data)*sizeof(WCHAR), &written, NULL);
+ CloseHandle(file);
b = 0xc;
V_VT(&var) = VT_BSTR;
- V_BSTR(&var) = data;
+ V_BSTR(&var) = _bstr_(path);
hr = IXMLDOMDocument_load(doc, var, &b);
+ todo_wine {
EXPECT_HR(hr, class_ptr->ret[0].hr);
ok(b == class_ptr->ret[0].b, "%d:%d, got %d, expected %d\n", index, i, b, class_ptr->ret[0].b);
+ }
+ DeleteFileA(path);
b = 0xc;
hr = IXMLDOMDocument_loadXML(doc, data, &b);
@@ -2103,8 +2118,10 @@ static void test_domdoc( void )
data_ptr++;
i++;
}
+
class_ptr++;
index++;
+ free_bstrs();
}
doc = create_document(&IID_IXMLDOMDocument);
More information about the wine-cvs
mailing list