Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
cefe6e8d
Commit
cefe6e8d
authored
Jan 12, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3/tests: Use temporary user directory for test files.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
110eecf7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
domdoc.c
dlls/msxml3/tests/domdoc.c
+13
-9
No files found.
dlls/msxml3/tests/domdoc.c
View file @
cefe6e8d
...
...
@@ -10155,16 +10155,20 @@ static void write_to_file(const char *name, const char *data)
static
void
test_load
(
void
)
{
IXMLDOMDocument
*
doc
,
*
doc2
;
BSTR
pathW
,
bstr1
,
bstr2
;
IXMLDOMNodeList
*
list
;
IXMLDOMElement
*
elem
;
char
path
[
MAX_PATH
];
VARIANT_BOOL
b
;
VARIANT
src
;
HRESULT
hr
;
BSTR
path
,
bstr1
,
bstr2
;
void
*
ptr
;
GetTempPathA
(
MAX_PATH
,
path
);
strcat
(
path
,
"winetest.xml"
);
/* prepare a file */
write_to_file
(
"test.xml"
,
win1252xml
);
write_to_file
(
path
,
win1252xml
);
doc
=
create_document
(
&
IID_IXMLDOMDocument
);
...
...
@@ -10175,11 +10179,11 @@ static void test_load(void)
EXPECT_HR
(
hr
,
E_INVALIDARG
);
ok
(
b
==
VARIANT_FALSE
,
"got %d
\n
"
,
b
);
path
=
_bstr_
(
"test.xml"
);
path
W
=
_bstr_
(
path
);
/* load from path: VT_BSTR */
V_VT
(
&
src
)
=
VT_BSTR
;
V_BSTR
(
&
src
)
=
path
;
V_BSTR
(
&
src
)
=
path
W
;
hr
=
IXMLDOMDocument_load
(
doc
,
src
,
&
b
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
b
==
VARIANT_TRUE
,
"got %d
\n
"
,
b
);
...
...
@@ -10191,7 +10195,7 @@ static void test_load(void)
/* load from a path: VT_BSTR|VT_BYREF */
V_VT
(
&
src
)
=
VT_BSTR
|
VT_BYREF
;
V_BSTRREF
(
&
src
)
=
&
path
;
V_BSTRREF
(
&
src
)
=
&
path
W
;
hr
=
IXMLDOMDocument_load
(
doc
,
src
,
&
b
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
b
==
VARIANT_TRUE
,
"got %d
\n
"
,
b
);
...
...
@@ -10229,13 +10233,13 @@ static void test_load(void)
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
SysFreeString
(
bstr1
);
DeleteFileA
(
"test.xml"
);
DeleteFileA
(
path
);
/* load from existing path, no xml content */
write_to_file
(
"test.xml"
,
nocontent
);
write_to_file
(
path
,
nocontent
);
V_VT
(
&
src
)
=
VT_BSTR
;
V_BSTR
(
&
src
)
=
path
;
V_BSTR
(
&
src
)
=
path
W
;
b
=
VARIANT_TRUE
;
hr
=
IXMLDOMDocument_load
(
doc
,
src
,
&
b
);
ok
(
hr
==
S_FALSE
,
"got 0x%08x
\n
"
,
hr
);
...
...
@@ -10246,7 +10250,7 @@ static void test_load(void)
ok
(
hr
==
S_FALSE
,
"got 0x%08x
\n
"
,
hr
);
ok
(
bstr1
==
NULL
,
"got %p
\n
"
,
bstr1
);
DeleteFileA
(
"test.xml"
);
DeleteFileA
(
path
);
IXMLDOMDocument_Release
(
doc
);
doc
=
create_document
(
&
IID_IXMLDOMDocument
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment