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
82b2a833
Commit
82b2a833
authored
Jul 08, 2008
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Added test of files generated by IXMLDOMDocument_save.
parent
800463c2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
domdoc.c
dlls/msxml3/tests/domdoc.c
+49
-0
No files found.
dlls/msxml3/tests/domdoc.c
View file @
82b2a833
...
...
@@ -3263,6 +3263,54 @@ static void test_DocumentSaveToDocument(void)
IXMLDOMDocument_Release
(
doc
);
}
static
void
test_DocumentSaveToFile
(
void
)
{
IXMLDOMDocument
*
doc
=
NULL
;
IXMLDOMElement
*
pRoot
;
HANDLE
file
;
char
buffer
[
100
];
DWORD
read
=
0
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_DOMDocument
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IXMLDOMDocument2
,
(
LPVOID
*
)
&
doc
);
if
(
hr
!=
S_OK
)
return
;
hr
=
IXMLDOMDocument_createElement
(
doc
,
_bstr_
(
"Testing"
),
&
pRoot
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
hr
=
IXMLDOMDocument_appendChild
(
doc
,
(
IXMLDOMNode
*
)
pRoot
,
NULL
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
VARIANT
vFile
;
V_VT
(
&
vFile
)
=
VT_BSTR
;
V_BSTR
(
&
vFile
)
=
_bstr_
(
"test.xml"
);
hr
=
IXMLDOMDocument_save
(
doc
,
vFile
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
}
}
IXMLDOMElement_Release
(
pRoot
);
IXMLDOMDocument_Release
(
doc
);
file
=
CreateFile
(
"test.xml"
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"Could not open file: %u
\n
"
,
GetLastError
());
if
(
file
==
INVALID_HANDLE_VALUE
)
return
;
ReadFile
(
file
,
buffer
,
sizeof
(
buffer
),
&
read
,
NULL
);
ok
(
read
!=
0
,
"could not read file
\n
"
);
todo_wine
{
ok
(
buffer
[
0
]
!=
'<'
||
buffer
[
1
]
!=
'?'
,
"File contains processing instruction
\n
"
);
}
DeleteFile
(
"test.xml"
);
}
static
void
test_testTransforms
(
void
)
{
IXMLDOMDocument
*
doc
=
NULL
;
...
...
@@ -3389,6 +3437,7 @@ START_TEST(domdoc)
test_xmlTypes
();
test_nodeTypeTests
();
test_DocumentSaveToDocument
();
test_DocumentSaveToFile
();
test_testTransforms
();
test_Namespaces
();
...
...
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