mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 10:05:29 +00:00
introduce a test for n-i-bz fix bug in strspn replacement
c1eace647ca4f670ef9bec0d0fe72cdd25a96394 fixed a bug in strspn replacement. Add a test to cover this fix.
This commit is contained in:
parent
bf87528d10
commit
2f9cceafa3
@ -710,6 +710,15 @@ test_strspn (void)
|
||||
check(strspn("abc", "qx") == 0, 3); /* None. */
|
||||
check(strspn("", "ab") == 0, 4); /* Null string. */
|
||||
check(strspn("abc", "") == 0, 5); /* Null search list. */
|
||||
{
|
||||
unsigned char work4[4];
|
||||
work4[0] = 0xe2;
|
||||
work4[1] = 0xe3;
|
||||
work4[2] = 0xd9;
|
||||
work4[3] = '\0';
|
||||
/* Check for signed/unsigned mixup */
|
||||
check(strspn((char*)work4, (char*)work4) == 3, 6);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user