Commit 7d2d86dc authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Test-cover for the last three lines of vct.h

parent 0c02c675
...@@ -303,11 +303,16 @@ int ...@@ -303,11 +303,16 @@ int
main(int argc, char **argv) main(int argc, char **argv)
{ {
int i; int i;
const char *p;
(void)argc; (void)argc;
(void)argv; (void)argv;
AN(setlocale(LC_ALL, "C")); AN(setlocale(LC_ALL, "C"));
p = "";
assert(vct_iscrlf(p, p) == 0);
for (i = 0x20; i < 0x7f; i++) for (i = 0x20; i < 0x7f; i++)
assert(vct_lowertab[i] == tolower(i)); assert(vct_lowertab[i] == tolower(i));
...@@ -329,6 +334,10 @@ main(int argc, char **argv) ...@@ -329,6 +334,10 @@ main(int argc, char **argv)
assert(vct_caselencmp("AZaz ", "azAY", 5) > 0); assert(vct_caselencmp("AZaz ", "azAY", 5) > 0);
assert(vct_caselencmp("AZay ", "azAZ", 5) < 0); assert(vct_caselencmp("AZay ", "azAZ", 5) < 0);
assert(vct_caselencmp("AZaz", "azAZ1", 5) < 0);
assert(vct_caselencmp("AZaz1", "azAZ", 5) > 0);
assert(vct_caselencmp("A", "B", 0) == 0); assert(vct_caselencmp("A", "B", 0) == 0);
return (0); return (0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment