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
311fce67
Commit
311fce67
authored
Aug 12, 2015
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Aug 12, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10/tests: Add tests for control character glyphs.
parent
a556f9e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
1 deletion
+46
-1
usp10.c
dlls/usp10/tests/usp10.c
+46
-1
No files found.
dlls/usp10/tests/usp10.c
View file @
311fce67
...
...
@@ -1334,7 +1334,7 @@ static void test_ScriptShape(HDC hdc)
WORD
glyphs
[
4
],
glyphs2
[
4
],
logclust
[
4
];
SCRIPT_VISATTR
attrs
[
4
];
SCRIPT_ITEM
items
[
2
];
int
nb
;
int
nb
,
i
,
j
;
hr
=
ScriptItemize
(
test1
,
4
,
2
,
NULL
,
NULL
,
items
,
NULL
);
ok
(
hr
==
S_OK
,
"ScriptItemize should return S_OK not %08x
\n
"
,
hr
);
...
...
@@ -1454,6 +1454,51 @@ static void test_ScriptShape(HDC hdc)
ok
(
attrs
[
3
].
fZeroWidth
==
0
,
"fZeroWidth incorrect
\n
"
);
ScriptFreeCache
(
&
sc
);
/* some control characters are shown as blank */
for
(
i
=
0
;
i
<
2
;
i
++
)
{
static
const
WCHAR
space
[]
=
{
' '
,
0
};
static
const
WCHAR
blanks
[]
=
{
'\t'
,
'\r'
,
'\n'
,
0x001C
,
0x001D
,
0x001E
,
0x001F
,
0
};
HFONT
font
,
oldfont
=
NULL
;
LOGFONTA
lf
;
font
=
GetCurrentObject
(
hdc
,
OBJ_FONT
);
GetObjectA
(
font
,
sizeof
(
lf
),
&
lf
);
if
(
i
==
1
)
{
lstrcpyA
(
lf
.
lfFaceName
,
"MS Sans Serif"
);
font
=
CreateFontIndirectA
(
&
lf
);
oldfont
=
SelectObject
(
hdc
,
font
);
}
hr
=
ScriptItemize
(
space
,
1
,
2
,
NULL
,
NULL
,
items
,
NULL
);
ok
(
hr
==
S_OK
,
"%s: expected S_OK, got %08x
\n
"
,
lf
.
lfFaceName
,
hr
);
hr
=
ScriptShape
(
hdc
,
&
sc
,
space
,
1
,
1
,
&
items
[
0
].
a
,
glyphs
,
logclust
,
attrs
,
&
nb
);
ok
(
hr
==
S_OK
,
"%s: expected S_OK, got %08x
\n
"
,
lf
.
lfFaceName
,
hr
);
ok
(
nb
==
1
,
"%s: expected 1, got %d
\n
"
,
lf
.
lfFaceName
,
nb
);
for
(
j
=
0
;
blanks
[
j
];
j
++
)
{
hr
=
ScriptItemize
(
&
blanks
[
j
],
1
,
2
,
NULL
,
NULL
,
items
,
NULL
);
ok
(
hr
==
S_OK
,
"%s: [%02x] expected S_OK, got %08x
\n
"
,
lf
.
lfFaceName
,
blanks
[
j
],
hr
);
hr
=
ScriptShape
(
hdc
,
&
sc
,
&
blanks
[
j
],
1
,
1
,
&
items
[
0
].
a
,
glyphs2
,
logclust
,
attrs
,
&
nb
);
ok
(
hr
==
S_OK
,
"%s: [%02x] expected S_OK, got %08x
\n
"
,
lf
.
lfFaceName
,
blanks
[
j
],
hr
);
ok
(
nb
==
1
,
"%s: [%02x] expected 1, got %d
\n
"
,
lf
.
lfFaceName
,
blanks
[
j
],
nb
);
if
(
i
==
0
&&
blanks
[
j
]
!=
'\n'
)
ok
(
glyphs
[
0
]
==
glyphs2
[
0
]
||
broken
(
glyphs2
[
0
]
==
blanks
[
j
]
&&
(
blanks
[
j
]
<
0x10
)),
"%s: [%02x] expected %04x, got %04x
\n
"
,
lf
.
lfFaceName
,
blanks
[
j
],
glyphs
[
0
],
glyphs2
[
0
]);
else
todo_wine
ok
(
glyphs
[
0
]
==
glyphs2
[
0
]
||
broken
(
glyphs2
[
0
]
==
blanks
[
j
]
&&
(
blanks
[
j
]
<
0x10
)),
"%s: [%02x] expected %04x, got %04x
\n
"
,
lf
.
lfFaceName
,
blanks
[
j
],
glyphs
[
0
],
glyphs2
[
0
]);
}
if
(
oldfont
)
DeleteObject
(
SelectObject
(
hdc
,
oldfont
));
ScriptFreeCache
(
&
sc
);
}
}
static
void
test_ScriptPlace
(
HDC
hdc
)
...
...
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