projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix copy/paste bug: Use unique name for compiler warnings.
[gnulib.git]
/
tests
/
test-mbmemcasecmp.h
diff --git
a/tests/test-mbmemcasecmp.h
b/tests/test-mbmemcasecmp.h
index
bd85331
..
180a831
100644
(file)
--- a/
tests/test-mbmemcasecmp.h
+++ b/
tests/test-mbmemcasecmp.h
@@
-1,5
+1,5
@@
/* Test of case-insensitive memory area comparison function.
/* Test of case-insensitive memory area comparison function.
- Copyright (C) 2007-20
09
Free Software Foundation, Inc.
+ Copyright (C) 2007-20
10
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-62,6
+62,12
@@
test_ascii (int (*my_casecmp) (const char *, size_t, const char *, size_t))
ASSERT (my_casecmp ("para", 4, "paragraph", 9) < 0);
ASSERT (my_casecmp ("paragraph", 9, "para", 4) > 0);
ASSERT (my_casecmp ("para", 4, "paragraph", 9) < 0);
ASSERT (my_casecmp ("paragraph", 9, "para", 4) > 0);
+
+ /* Embedded NULs. */
+ ASSERT (my_casecmp ("1\0", 2, "2\0", 2) < 0);
+ ASSERT (my_casecmp ("2\0", 2, "1\0", 2) > 0);
+ ASSERT (my_casecmp ("x\0""1", 3, "x\0""2", 3) < 0);
+ ASSERT (my_casecmp ("x\0""2", 3, "x\0""1", 3) > 0);
}
static void
}
static void