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
1868abda
Commit
1868abda
authored
Jan 21, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Jan 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add more MsiFormatRecord tests.
parent
9f41a53c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
format.c
dlls/msi/tests/format.c
+72
-0
No files found.
dlls/msi/tests/format.c
View file @
1868abda
...
...
@@ -1646,6 +1646,42 @@ static void test_formatrecord(void)
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
=
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
);
todo_wine
{
ok
(
!
lstrcmpA
(
buffer
,
"one {[noprop] [twoprop]} {abcdef}"
),
"Expected
\"
one {[noprop] [twoprop]} {abcdef}
\"
, got
\"
%s
\"\n
"
,
buffer
);
}
sz
=
sizeof
(
buffer
);
MsiRecordSetString
(
hrec
,
0
,
"[1] {[noprop] [one]} {abcdef}"
);
MsiRecordSetString
(
hrec
,
1
,
"one"
);
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
);
todo_wine
{
ok
(
!
lstrcmpA
(
buffer
,
"one {[noprop] [one]} {abcdef}"
),
"Expected
\"
one {[noprop] [one]} {abcdef}
\"
, got
\"
%s
\"\n
"
,
buffer
);
}
sz
=
sizeof
(
buffer
);
MsiRecordSetString
(
hrec
,
0
,
"[1] {[one]} {abcdef}"
);
MsiRecordSetString
(
hrec
,
1
,
"one"
);
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
);
todo_wine
{
ok
(
!
lstrcmpA
(
buffer
,
"one {[one]} {abcdef}"
),
"Expected
\"
one {[one]} {abcdef}
\"
, got
\"
%s
\"\n
"
,
buffer
);
}
MsiCloseHandle
(
hrec
);
}
...
...
@@ -2003,6 +2039,42 @@ static void test_formatrecord_package(void)
ok
(
0
==
strcmp
(
buffer
,
""
),
"wrong output (%s)
\n
"
,
buffer
);
}
sz
=
sizeof
(
buffer
);
MsiRecordSetString
(
hrec
,
0
,
"[1] {[noprop] [twoprop]} {abcdef}"
);
MsiRecordSetString
(
hrec
,
1
,
"one"
);
r
=
MsiFormatRecord
(
package
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
sz
==
13
,
"Expected 13, got %d
\n
"
,
sz
);
todo_wine
{
ok
(
!
lstrcmpA
(
buffer
,
"one {abcdef}"
),
"Expected
\"
one {abcdef}
\"
, got
\"
%s
\"\n
"
,
buffer
);
}
sz
=
sizeof
(
buffer
);
MsiRecordSetString
(
hrec
,
0
,
"[1] {[noprop] [one]} {abcdef}"
);
MsiRecordSetString
(
hrec
,
1
,
"one"
);
r
=
MsiFormatRecord
(
package
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
sz
==
13
,
"Expected 13, got %d
\n
"
,
sz
);
todo_wine
{
ok
(
!
lstrcmpA
(
buffer
,
"one {abcdef}"
),
"Expected
\"
one {abcdef}
\"
, got
\"
%s
\"\n
"
,
buffer
);
}
sz
=
sizeof
(
buffer
);
MsiRecordSetString
(
hrec
,
0
,
"[1] {[one]} {abcdef}"
);
MsiRecordSetString
(
hrec
,
1
,
"one"
);
r
=
MsiFormatRecord
(
package
,
hrec
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
sz
==
20
,
"Expected 20, got %d
\n
"
,
sz
);
todo_wine
{
ok
(
!
lstrcmpA
(
buffer
,
"one mercury {abcdef}"
),
"Expected
\"
one mercury {abcdef}
\"
, got
\"
%s
\"\n
"
,
buffer
);
}
MsiCloseHandle
(
hrec
);
r
=
MsiCloseHandle
(
package
);
...
...
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