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
6816aa29
Commit
6816aa29
authored
Feb 04, 2011
by
Austin English
Committed by
Alexandre Julliard
Feb 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Make sure to use return values (LLVM/Clang).
parent
4036cc06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
359 additions
and
49 deletions
+359
-49
format.c
dlls/msi/tests/format.c
+359
-49
No files found.
dlls/msi/tests/format.c
View file @
6816aa29
...
...
@@ -473,7 +473,9 @@ static void test_formatrecord(void)
/* now put something in the first field */
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"boo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -484,6 +486,7 @@ static void test_formatrecord(void)
/* empty string */
r
=
MsiRecordSetString
(
hrec
,
0
,
""
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
...
...
@@ -493,7 +496,9 @@ static void test_formatrecord(void)
/* play games with recursive lookups */
r
=
MsiRecordSetString
(
hrec
,
0
,
"[[1]] [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -503,7 +508,9 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"hey hey"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[[1]] [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"[2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -513,8 +520,11 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"[[2]] hey"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[[[3]]] [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -529,9 +539,13 @@ static void test_formatrecord(void)
ok
(
hrec
,
"failed to create record
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[[3][1]] [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -541,10 +555,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"big hey"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[[3][4][1]] [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -554,10 +573,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"big hey"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[[3][[4]][1]] [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -568,10 +592,15 @@ static void test_formatrecord(void)
/* incorrect formats */
r
=
MsiRecordSetString
(
hrec
,
0
,
"[[[3][[4]][1]] [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -581,10 +610,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"[[[3][[4]][1]] [2]"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[[3][[4]][1]] [2]]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -597,10 +631,15 @@ static void test_formatrecord(void)
/* play games with {} */
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[3][1]} [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -610,10 +649,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"12 hey"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[{[3][1]}] [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -624,10 +668,15 @@ static void test_formatrecord(void)
r
=
MsiRecordSetString
(
hrec
,
0
,
"{test} [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -637,10 +686,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"{test} hey"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[test]} [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -650,10 +704,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"{[test]} hey"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[1][2][3][4]} [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -663,10 +722,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
" hey"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[1][2][3][dummy]} [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -676,10 +740,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"{2hey1[dummy]} hey"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[1][2][3][4][dummy]} [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -689,10 +758,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"{2hey1[dummy]} hey"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{[1][2]}[3][4][dummy]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -702,10 +776,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"{{2hey}1[dummy]}"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{[1][2]}[3]{[4][dummy]}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hey"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -715,10 +794,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
""
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{[1][2]}[3]} {[1][2]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"3"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -728,10 +812,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"{{12}3} {12}"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[1][2]} {{[1][2]}[3]} {[1][2]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"3"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -741,10 +830,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"12 {{12}3} {12}"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[4]}{[1][2]} {{[1][2]}[3]} {[1][2]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"3"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -754,10 +848,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"12 {{12}3} {12}"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{blah} {[4]}{[1][2]} {{[1][2]}[3]} {[1][2]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"3"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -767,10 +866,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"{blah} 12 {{12}3} {12}"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{[1]}[2]} {[4]}{[1][2]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"3"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -780,10 +884,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"{{1}2} {}{12}"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{[1]}} {[4]}{[1][2]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"3"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -793,10 +902,15 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
" 12"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{{[1]}} {[4]}{[1][2]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"3"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
"big"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -809,7 +923,9 @@ static void test_formatrecord(void)
/* now put play games with escaping */
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] [2] [
\\
3asdf]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"boo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -820,7 +936,9 @@ static void test_formatrecord(void)
/* now put play games with escaping */
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] [2] [
\\
x]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"boo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -829,28 +947,32 @@ static void test_formatrecord(void)
ok
(
sz
==
12
,
"size wrong
\n
"
);
ok
(
0
==
strcmp
(
buffer
,
"boo hoo [
\\
x]"
),
"wrong output
\n
"
);
MsiRecordSetString
(
hrec
,
0
,
"[
\\
x]"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[
\\
x]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
4
,
"size wrong: %d
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
"[
\\
x]"
),
"wrong output: %s
\n
"
,
buffer
);
MsiRecordSetString
(
hrec
,
0
,
"{
\\
x}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{
\\
x}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
4
,
"size wrong: %d
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
"{
\\
x}"
),
"wrong output: %s
\n
"
,
buffer
);
MsiRecordSetString
(
hrec
,
0
,
"[abc
\\
x]"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[abc
\\
x]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
7
,
"size wrong: %d
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
"[abc
\\
x]"
),
"wrong output: %s
\n
"
,
buffer
);
MsiRecordSetString
(
hrec
,
0
,
"[
\\
[]Bracket Text[
\\
]]"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[
\\
[]Bracket Text[
\\
]]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
...
...
@@ -859,7 +981,9 @@ static void test_formatrecord(void)
/* now try other formats without a package */
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] [2] [property]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"boo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -869,7 +993,9 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"boo hoo [property]"
),
"wrong output
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] [~] [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"boo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -879,6 +1005,7 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"boo [~] hoo"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetInteger
(
hrec
,
1
,
123456
);
ok
(
r
==
ERROR_SUCCESS
,
"set integer failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -888,6 +1015,7 @@ static void test_formatrecord(void)
ok
(
0
==
strcmp
(
buffer
,
"123456"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[~]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
3
,
"size wrong
\n
"
);
...
...
@@ -903,6 +1031,7 @@ static void test_formatrecord(void)
/* MsiFormatRecord doesn't seem to handle a negative too well */
r
=
MsiRecordSetString
(
hrec
,
0
,
"[-1]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
4
,
"size wrong
\n
"
);
...
...
@@ -910,6 +1039,7 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
4
,
"size wrong
\n
"
);
...
...
@@ -917,6 +1047,7 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[0]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
3
,
"size wrong
\n
"
);
...
...
@@ -924,6 +1055,7 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[100]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
0
,
"size wrong
\n
"
);
...
...
@@ -931,8 +1063,11 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[1] [2]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"boo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
7
,
"size wrong
\n
"
);
...
...
@@ -940,6 +1075,7 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
0
,
"size wrong
\n
"
);
...
...
@@ -947,6 +1083,7 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{foo}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
5
,
"size wrong
\n
"
);
...
...
@@ -954,7 +1091,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{boo [1]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
7
,
"size wrong
\n
"
);
...
...
@@ -962,7 +1101,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{[1]}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
0
,
"size wrong
\n
"
);
...
...
@@ -970,7 +1111,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{ {[1]}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
todo_wine
...
...
@@ -981,7 +1124,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{[1]} }"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
8
,
"size wrong
\n
"
);
...
...
@@ -989,7 +1134,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{ [1]}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
0
,
"size wrong
\n
"
);
...
...
@@ -997,7 +1144,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{[1] }}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
0
,
"size wrong
\n
"
);
...
...
@@ -1005,6 +1154,7 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{a}{b}{c }{ d}{any text}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
0
,
"size wrong
\n
"
);
...
...
@@ -1012,6 +1162,7 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{a} }"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
6
,
"size wrong
\n
"
);
...
...
@@ -1019,22 +1170,23 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{a} {b}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
0
,
"size wrong
\n
"
);
ok
(
0
==
strcmp
(
buffer
,
""
),
"wrong output
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
todo_wine
{
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{a} b}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
0
,
"size wrong
\n
"
);
ok
(
0
==
strcmp
(
buffer
,
""
),
"wrong output
\n
"
);
}
todo_wine
ok
(
sz
==
0
,
"size wrong
\n
"
);
todo_wine
ok
(
0
==
strcmp
(
buffer
,
""
),
"wrong output
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{a b}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
0
,
"size wrong
\n
"
);
...
...
@@ -1042,6 +1194,7 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{ }"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
3
,
"size wrong
\n
"
);
...
...
@@ -1049,32 +1202,33 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
" {{a}}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
2
,
"size wrong
\n
"
);
ok
(
0
==
strcmp
(
buffer
,
" }"
),
"wrong output
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
todo_wine
{
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{ almost {{ any }} text }}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
8
,
"size wrong
\n
"
);
ok
(
0
==
strcmp
(
buffer
,
" text }}"
),
"wrong output
\n
"
);
}
todo_wine
ok
(
sz
==
8
,
"size wrong
\n
"
);
todo_wine
ok
(
0
==
strcmp
(
buffer
,
" text }}"
),
"wrong output
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
todo_wine
{
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{ } { hidden ][ [ }}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
0
,
"size wrong
\n
"
);
ok
(
0
==
strcmp
(
buffer
,
""
),
"wrong output
\n
"
);
}
todo_wine
ok
(
sz
==
0
,
"size wrong
\n
"
);
todo_wine
ok
(
0
==
strcmp
(
buffer
,
""
),
"wrong output
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[ 1]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
4
,
"size wrong
\n
"
);
...
...
@@ -1082,33 +1236,39 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[01]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
3
,
"size wrong
\n
"
);
ok
(
0
==
strcmp
(
buffer
,
"hoo"
),
"wrong output
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
todo_wine
{
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{test}} [01"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
4
,
"size wrong
\n
"
);
ok
(
0
==
strcmp
(
buffer
,
" [01"
),
"wrong output
\n
"
);
}
todo_wine
ok
(
sz
==
4
,
"size wrong
\n
"
);
todo_wine
ok
(
0
==
strcmp
(
buffer
,
" [01"
),
"wrong output
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[
\\
[]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
4
,
"size wrong
\n
"
);
ok
(
0
==
strcmp
(
buffer
,
"[
\\
[]"
),
"wrong output
\n
"
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
MsiRecordSetString
(
hrec
,
0
,
"[
\\
[]"
);
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[
\\
[]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
(
buffer
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
@@ -1116,7 +1276,9 @@ static void test_formatrecord(void)
ok
(
!
lstrcmpA
(
buffer
,
"[
\\
[]"
),
"Expected
\"
[
\\
[]
\"
, got
\"
%s
\"\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[foo]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
5
,
"size wrong
\n
"
);
...
...
@@ -1124,7 +1286,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[01.]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
5
,
"size wrong
\n
"
);
...
...
@@ -1133,6 +1297,7 @@ static void test_formatrecord(void)
SetEnvironmentVariable
(
"FOO"
,
"BAR"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[%FOO]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
6
,
"size wrong
\n
"
);
...
...
@@ -1140,7 +1305,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{[1]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
6
,
"size wrong
\n
"
);
...
...
@@ -1148,7 +1315,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{ {[1]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
8
,
"size wrong
\n
"
);
...
...
@@ -1156,7 +1325,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{ {[1]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
8
,
"size wrong
\n
"
);
...
...
@@ -1164,7 +1335,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{ {{[1]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
9
,
"size wrong
\n
"
);
...
...
@@ -1172,7 +1345,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
4
,
"size wrong
\n
"
);
...
...
@@ -1180,6 +1355,7 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{ {{a}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
7
,
"size wrong
\n
"
);
...
...
@@ -1187,6 +1363,7 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{ {{a}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
7
,
"size wrong
\n
"
);
...
...
@@ -1194,7 +1371,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"0{1{2{3{4[1]5}6}7}8}9"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
todo_wine
...
...
@@ -1205,7 +1384,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"0{1{2[1]3}4"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
todo_wine
...
...
@@ -1216,7 +1397,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"0{1{2[1]3}4"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
todo_wine
...
...
@@ -1227,7 +1410,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[1.} [1]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
9
,
"size wrong
\n
"
);
...
...
@@ -1238,8 +1423,11 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[{[1]}]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"foo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
todo_wine
...
...
@@ -1250,8 +1438,11 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[1][}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"foo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
todo_wine
...
...
@@ -1262,8 +1453,11 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"[2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"foo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
3
,
"size wrong
\n
"
);
...
...
@@ -1271,7 +1465,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[{{boo}}1]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
...
...
@@ -1282,8 +1478,11 @@ static void test_formatrecord(void)
}
r
=
MsiRecordSetString
(
hrec
,
0
,
"[{{boo}}1]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1{{boo}}]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
3
,
"size wrong
\n
"
);
...
...
@@ -1291,7 +1490,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[1]{{boo} }}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
todo_wine
...
...
@@ -1302,7 +1503,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[1{{boo}}]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
todo_wine
...
...
@@ -1313,7 +1516,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{[1]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
6
,
"size wrong: got %u, expected 3
\n
"
,
sz
);
...
...
@@ -1321,7 +1526,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[1{{bo}o}}]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
13
,
"size wrong
\n
"
);
...
...
@@ -1329,6 +1536,7 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[1{{b{o}o}}]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
todo_wine
...
...
@@ -1339,7 +1547,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{ {[1]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
todo_wine
...
...
@@ -1351,7 +1561,9 @@ static void test_formatrecord(void)
/* {} inside a substitution does strange things... */
r
=
MsiRecordSetString
(
hrec
,
0
,
"[[1]{}]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
todo_wine
...
...
@@ -1362,7 +1574,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[[1]{}[1]]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
todo_wine
...
...
@@ -1373,7 +1587,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[a[1]b[1]c{}d[1]e]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
todo_wine
...
...
@@ -1384,7 +1600,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[a[1]b"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
6
,
"size wrong
\n
"
);
...
...
@@ -1392,7 +1610,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"a[1]b]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
4
,
"size wrong
\n
"
);
...
...
@@ -1400,7 +1620,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"]a[1]b"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
4
,
"size wrong
\n
"
);
...
...
@@ -1408,7 +1630,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"]a[1]b"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
4
,
"size wrong
\n
"
);
...
...
@@ -1416,7 +1640,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"
\\
[1]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
2
,
"size wrong
\n
"
);
...
...
@@ -1424,7 +1650,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"
\\
{[1]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"2"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
2
,
"size wrong
\n
"
);
...
...
@@ -1432,7 +1660,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"a{b[1]c}d"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
2
,
"size wrong
\n
"
);
...
...
@@ -1440,7 +1670,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{a[0]b}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"foo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
9
,
"size wrong
\n
"
);
...
...
@@ -1448,6 +1680,7 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[foo]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
sz
==
5
,
"size wrong
\n
"
);
...
...
@@ -1455,7 +1688,9 @@ static void test_formatrecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[1][-1][1]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"foo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
todo_wine
...
...
@@ -1467,70 +1702,80 @@ static void test_formatrecord(void)
/* nested braces */
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{abcd}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{abcd}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
6
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
"{abcd}"
),
"wrong output (%s)
\n
"
,
buffer
);
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{a[one]bc[two]de[one]f}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{a[one]bc[two]de[one]f}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
23
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
"{a[one]bc[two]de[one]f}"
),
"wrong output (%s)
\n
"
,
buffer
);
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{a[one]bc[bad]de[two]f}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{a[one]bc[bad]de[two]f}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
23
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
"{a[one]bc[bad]de[two]f}"
),
"wrong output (%s)
\n
"
,
buffer
);
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{[bad]}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{[bad]}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
7
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
"{[bad]}"
),
"wrong output (%s)
\n
"
,
buffer
);
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{abc{d[one]ef}"
);
/* missing final brace */
r
=
MsiRecordSetString
(
hrec
,
0
,
"{abc{d[one]ef}"
);
/* missing final brace */
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
14
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
"{abc{d[one]ef}"
),
"wrong output (%s)
\n
"
,
buffer
);
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{abc{d[one]ef}}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{abc{d[one]ef}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
15
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
"{abc{d[one]ef}}"
),
"wrong output (%s)
\n
"
,
buffer
);
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{abc}{{def}hi{j[one]k}}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{abc}{{def}hi{j[one]k}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
5
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
"{abc}"
),
"wrong output (%s)
\n
"
,
buffer
);
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{{def}hi{j[one]k}}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{def}hi{j[one]k}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
0
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
""
),
"wrong output (%s)
\n
"
,
buffer
);
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{{def}hi{jk}}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{def}hi{jk}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
0
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
""
),
"wrong output (%s)
\n
"
,
buffer
);
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{{{def}}hi{jk}}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{{def}}hi{jk}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
todo_wine
...
...
@@ -1540,7 +1785,8 @@ static void test_formatrecord(void)
}
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{{def}hi{{jk}}}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{def}hi{{jk}}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
todo_wine
...
...
@@ -1550,42 +1796,48 @@ static void test_formatrecord(void)
}
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{{def}{jk}}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{def}{jk}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
0
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
""
),
"wrong output (%s)
\n
"
,
buffer
);
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{{def}}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{def}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
0
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
""
),
"wrong output (%s)
\n
"
,
buffer
);
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{a{b}c}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{a{b}c}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
7
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
"{a{b}c}"
),
"wrong output (%s)
\n
"
,
buffer
);
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{a{b}}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{a{b}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
6
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
"{a{b}}"
),
"wrong output (%s)
\n
"
,
buffer
);
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{{b}c}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{b}c}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
6
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
"{{b}c}"
),
"wrong output (%s)
\n
"
,
buffer
);
sz
=
sizeof
buffer
;
MsiRecordSetString
(
hrec
,
0
,
"{{{{}}}}"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"{{{{}}}}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
todo_wine
...
...
@@ -1597,15 +1849,18 @@ static void test_formatrecord(void)
sz
=
sizeof
buffer
;
MsiRecordSetInteger
(
hrec
,
1
,
100
);
MsiRecordSetInteger
(
hrec
,
2
,
-
100
);
MsiRecordSetString
(
hrec
,
0
,
"[1] [2]"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
ok
(
sz
==
8
,
"size wrong(%i)
\n
"
,
sz
);
ok
(
0
==
strcmp
(
buffer
,
"100 -100"
),
"wrong output (%s)
\n
"
,
buffer
);
sz
=
sizeof
(
buffer
);
MsiRecordSetString
(
hrec
,
0
,
"[1] {[noprop] [twoprop]} {abcdef}"
);
MsiRecordSetString
(
hrec
,
1
,
"one"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] {[noprop] [twoprop]} {abcdef}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"one"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
sz
==
33
,
"Expected 33, got %d
\n
"
,
sz
);
...
...
@@ -1613,8 +1868,10 @@ static void test_formatrecord(void)
"Expected
\"
one {[noprop] [twoprop]} {abcdef}
\"
, got
\"
%s
\"\n
"
,
buffer
);
sz
=
sizeof
(
buffer
);
MsiRecordSetString
(
hrec
,
0
,
"[1] {[noprop] [one]} {abcdef}"
);
MsiRecordSetString
(
hrec
,
1
,
"one"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] {[noprop] [one]} {abcdef}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"one"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
sz
==
29
,
"Expected 29, got %d
\n
"
,
sz
);
...
...
@@ -1622,8 +1879,10 @@ static void test_formatrecord(void)
"Expected
\"
one {[noprop] [one]} {abcdef}
\"
, got
\"
%s
\"\n
"
,
buffer
);
sz
=
sizeof
(
buffer
);
MsiRecordSetString
(
hrec
,
0
,
"[1] {[one]} {abcdef}"
);
MsiRecordSetString
(
hrec
,
1
,
"one"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] {[one]} {abcdef}"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"one"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiFormatRecord
(
0
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
sz
==
20
,
"Expected 20, got %d
\n
"
,
sz
);
...
...
@@ -1659,17 +1918,29 @@ static void test_formatrecord_package(void)
ok
(
r
==
ERROR_SUCCESS
,
"format failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
5
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
6
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
7
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
8
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
9
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
10
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
11
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
12
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
...
...
@@ -1683,10 +1954,15 @@ static void test_formatrecord_package(void)
ok
(
r
==
ERROR_SUCCESS
,
"failed to set propertY: %d
\n
"
,
r
);
r
=
MsiRecordSetString
(
hrec
,
0
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"[2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"stuff"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"prop"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
4
,
"[prop]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
5
,
"[noprop]"
);
sz
=
sizeof
buffer
;
r
=
MsiFormatRecord
(
package
,
hrec
,
buffer
,
&
sz
);
...
...
@@ -1701,7 +1977,9 @@ static void test_formatrecord_package(void)
/* now put play games with escaping */
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] [2] [
\\
3asdf]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"boo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -1711,7 +1989,9 @@ static void test_formatrecord_package(void)
ok
(
0
==
strcmp
(
buffer
,
"boo hoo 3"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] [2] [
\\
x]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"boo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -1852,7 +2132,9 @@ static void test_formatrecord_package(void)
/* null characters */
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] [~] [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"boo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -1863,9 +2145,12 @@ static void test_formatrecord_package(void)
ok
(
!
lstrcmpA
(
&
buffer
[
5
],
" hoo"
),
"Expected
\"
hoo
\"
, got
\"
%s
\"\n
"
,
&
buffer
[
5
]);
MsiRecordSetString
(
hrec
,
0
,
"[1] [~abc] [2]"
);
MsiRecordSetString
(
hrec
,
1
,
"boo"
);
MsiRecordSetString
(
hrec
,
2
,
"hoo"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] [~abc] [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"boo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
(
buffer
);
r
=
MsiFormatRecord
(
package
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
@@ -1876,7 +2161,9 @@ static void test_formatrecord_package(void)
r
=
MsiSetProperty
(
package
,
"dummy"
,
"Bork"
);
ok
(
r
==
ERROR_SUCCESS
,
"set property failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] [dummy] [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"boo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -1886,7 +2173,9 @@ static void test_formatrecord_package(void)
ok
(
0
==
strcmp
(
buffer
,
"boo Bork hoo"
),
"wrong output
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] [invalid] [2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"boo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -1897,12 +2186,17 @@ static void test_formatrecord_package(void)
/* nesting tests */
r
=
MsiSetProperty
(
package
,
"dummya"
,
"foo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiSetProperty
(
package
,
"dummyb"
,
"baa"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiSetProperty
(
package
,
"adummyc"
,
"whoa"
);
ok
(
r
==
ERROR_SUCCESS
,
"set property failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[dummy[1]] [dummy[2]] [[1]dummy[3]]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"a"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"b"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"c"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -1912,11 +2206,15 @@ static void test_formatrecord_package(void)
ok
(
0
==
strcmp
(
buffer
,
"foo baa whoa"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiSetProperty
(
package
,
"dummya"
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set property failed
\n
"
);
r
=
MsiSetProperty
(
package
,
"dummyb"
,
"[2]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set property failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[dummya] [[dummya]] [dummyb]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"aaa"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"bbb"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"ccc"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -1929,13 +2227,19 @@ static void test_formatrecord_package(void)
}
r
=
MsiSetProperty
(
package
,
"dummya"
,
"1"
);
ok
(
r
==
ERROR_SUCCESS
,
"set property failed
\n
"
);
r
=
MsiSetProperty
(
package
,
"dummyb"
,
"a"
);
ok
(
r
==
ERROR_SUCCESS
,
"set property failed
\n
"
);
r
=
MsiSetProperty
(
package
,
"dummyc"
,
"
\\
blath"
);
ok
(
r
==
ERROR_SUCCESS
,
"set property failed
\n
"
);
r
=
MsiSetProperty
(
package
,
"dummyd"
,
"[
\\
blath]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set property failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[dummyc] [[dummyc]] [dummy[dummyb]]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"aaa"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"bbb"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"ccc"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -1945,8 +2249,11 @@ static void test_formatrecord_package(void)
ok
(
0
==
strcmp
(
buffer
,
"
\\
blath b 1"
),
"wrong output (%s)
\n
"
,
buffer
);
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] [2] [[
\\
3asdf]]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"boo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"yeah"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
@@ -1959,8 +2266,11 @@ static void test_formatrecord_package(void)
}
r
=
MsiRecordSetString
(
hrec
,
0
,
"[1] [2] [[3]]"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
"boo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
2
,
"hoo"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
3
,
"
\\
help"
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
sz
=
sizeof
buffer
;
...
...
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