Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
5579d2f9
Commit
5579d2f9
authored
Feb 25, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Feb 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Tests for put_data.
parent
72cbaa8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
0 deletions
+65
-0
domdoc.c
dlls/msxml3/tests/domdoc.c
+65
-0
No files found.
dlls/msxml3/tests/domdoc.c
View file @
5579d2f9
...
@@ -569,6 +569,22 @@ static void test_domdoc( void )
...
@@ -569,6 +569,22 @@ static void test_domdoc( void )
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"text"
)
),
"incorrect nodeTypeString string
\n
"
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"text"
)
),
"incorrect nodeTypeString string
\n
"
);
SysFreeString
(
str
);
SysFreeString
(
str
);
/* put data Tests */
r
=
IXMLDOMText_put_data
(
nodetext
,
_bstr_
(
"This &is a ; test <>
\\
"
));
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
/* Confirm XML text is good */
r
=
IXMLDOMText_get_xml
(
nodetext
,
&
str
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"This &is a ; test <>
\\
"
)
),
"incorrect xml string
\n
"
);
SysFreeString
(
str
);
/* Confirm we get the put_data Text back */
r
=
IXMLDOMText_get_text
(
nodetext
,
&
str
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"This &is a ; test <>
\\
"
)
),
"incorrect xml string
\n
"
);
SysFreeString
(
str
);
IXMLDOMText_Release
(
nodetext
);
IXMLDOMText_Release
(
nodetext
);
}
}
SysFreeString
(
str
);
SysFreeString
(
str
);
...
@@ -657,12 +673,29 @@ static void test_domdoc( void )
...
@@ -657,12 +673,29 @@ static void test_domdoc( void )
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"version=
\"
1.0
\"
"
)
),
"incorrect data string
\n
"
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"version=
\"
1.0
\"
"
)
),
"incorrect data string
\n
"
);
SysFreeString
(
str
);
SysFreeString
(
str
);
/* test put_data */
r
=
IXMLDOMProcessingInstruction_put_data
(
nodePI
,
_bstr_
(
"version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
"
));
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
SysFreeString
(
str
);
r
=
IXMLDOMProcessingInstruction_get_data
(
nodePI
,
&
str
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
"
)
),
"incorrect data string
\n
"
);
SysFreeString
(
str
);
/* Confirm XML text is good */
r
=
IXMLDOMProcessingInstruction_get_xml
(
nodePI
,
&
str
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
?>"
)
),
"incorrect xml string
\n
"
);
SysFreeString
(
str
);
IXMLDOMProcessingInstruction_Release
(
nodePI
);
IXMLDOMProcessingInstruction_Release
(
nodePI
);
}
}
r
=
IXMLDOMDocument_Release
(
doc
);
r
=
IXMLDOMDocument_Release
(
doc
);
ok
(
r
==
0
,
"document ref count incorrect
\n
"
);
ok
(
r
==
0
,
"document ref count incorrect
\n
"
);
free_bstrs
();
}
}
static
void
test_domnode
(
void
)
static
void
test_domnode
(
void
)
...
@@ -2059,6 +2092,22 @@ static void test_xmlTypes(void)
...
@@ -2059,6 +2092,22 @@ static void test_xmlTypes(void)
ok
(
V_VT
(
&
v
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
ok
(
V_VT
(
&
v
)
==
VT_NULL
,
"incorrect dataType type
\n
"
);
VariantClear
(
&
v
);
VariantClear
(
&
v
);
/* put data Tests */
hr
=
IXMLDOMComment_put_data
(
pComment
,
_bstr_
(
"This &is a ; test <>
\\
"
));
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
/* Confirm XML text is good */
hr
=
IXMLDOMComment_get_xml
(
pComment
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"<!--This &is a ; test <>
\\
-->"
)
),
"incorrect xml string
\n
"
);
SysFreeString
(
str
);
/* Confirm we get the put_data Text back */
hr
=
IXMLDOMComment_get_text
(
pComment
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"This &is a ; test <>
\\
"
)
),
"incorrect xml string
\n
"
);
SysFreeString
(
str
);
IXMLDOMComment_Release
(
pComment
);
IXMLDOMComment_Release
(
pComment
);
}
}
...
@@ -2243,6 +2292,22 @@ static void test_xmlTypes(void)
...
@@ -2243,6 +2292,22 @@ static void test_xmlTypes(void)
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"cdatasection"
)
),
"incorrect nodeTypeString string
\n
"
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"cdatasection"
)
),
"incorrect nodeTypeString string
\n
"
);
SysFreeString
(
str
);
SysFreeString
(
str
);
/* put data Tests */
hr
=
IXMLDOMCDATASection_put_data
(
pCDataSec
,
_bstr_
(
"This &is a ; test <>
\\
"
));
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
/* Confirm XML text is good */
hr
=
IXMLDOMCDATASection_get_xml
(
pCDataSec
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"<![CDATA[This &is a ; test <>
\\
]]>"
)
),
"incorrect xml string
\n
"
);
SysFreeString
(
str
);
/* Confirm we get the put_data Text back */
hr
=
IXMLDOMCDATASection_get_text
(
pCDataSec
,
&
str
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
str
,
_bstr_
(
"This &is a ; test <>
\\
"
)
),
"incorrect text string
\n
"
);
SysFreeString
(
str
);
IXMLDOMCDATASection_Release
(
pCDataSec
);
IXMLDOMCDATASection_Release
(
pCDataSec
);
}
}
...
...
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