/* Test of case-insensitive memory area comparison function.
- Copyright (C) 2007-2010 Free Software Foundation, Inc.
+ Copyright (C) 2007-2011 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
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