projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
canonicalize-lgpl: fix glibc bug with trailing slash
[gnulib.git]
/
tests
/
uninorm
/
test-u8-nfkc.c
diff --git
a/tests/uninorm/test-u8-nfkc.c
b/tests/uninorm/test-u8-nfkc.c
index
6792e82
..
0ea4636
100644
(file)
--- a/
tests/uninorm/test-u8-nfkc.c
+++ b/
tests/uninorm/test-u8-nfkc.c
@@
-88,7
+88,7
@@
check (const uint8_t *input, size_t input_length,
result = u8_normalize (UNINORM_NFKC, input, input_length, preallocated, &length);
if (!(result != NULL))
return 8;
result = u8_normalize (UNINORM_NFKC, input, input_length, preallocated, &length);
if (!(result != NULL))
return 8;
- if (!(result == preallocated))
+ if (!(
preallocated == NULL ||
result == preallocated))
return 9;
if (!(length == expected_length))
return 10;
return 9;
if (!(length == expected_length))
return 10;
@@
-103,6
+103,9
@@
check (const uint8_t *input, size_t input_length,
void
test_u8_nfkc (void)
{
void
test_u8_nfkc (void)
{
+ { /* Empty string. */
+ ASSERT (check (NULL, 0, NULL, 0) == 0);
+ }
{ /* SPACE */
static const uint8_t input[] = { 0x20 };
ASSERT (check (input, SIZEOF (input), input, SIZEOF (input)) == 0);
{ /* SPACE */
static const uint8_t input[] = { 0x20 };
ASSERT (check (input, SIZEOF (input), input, SIZEOF (input)) == 0);