Commit 25f9b306 authored by Guillem Jover's avatar Guillem Jover

test: Improve code coverage for strnstr(3) unit tests

parent 18ebabf2
......@@ -35,11 +35,15 @@ main(int argc, char **argv)
assert(strnstr(large, "", strlen(large)) == large);
assert(strnstr(large, "far", strlen(large)) == NULL);
assert(strnstr(large, "quux", strlen(large)) == NULL);
assert(strnstr(large, small, 4) == NULL);
assert(strnstr(large, small, strlen(large)) == (large + 4));
assert(strnstr("quux", large, strlen("quux")) == NULL);
assert(strnstr("foo", large, strlen("foo")) == NULL);
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