diff --git a/string/test-strncmp.c b/string/test-strncmp.c index df7cea4068..1a87f0e73e 100644 --- a/string/test-strncmp.c +++ b/string/test-strncmp.c @@ -445,6 +445,18 @@ check4 (void) check_result (impl, s1, s2, size, exp_result); } +static void +check5 (void) +{ + const CHAR *s1 = L ("abc"); + CHAR *s2 = STRDUP (s1); + + FOR_EACH_IMPL (impl, 0) + check_result (impl, s1, s2, SIZE_MAX, 0); + + free (s2); +} + static void check_overflow (void) { @@ -569,6 +581,7 @@ test_main (void) check2 (); check3 (); check4 (); + check5 (); printf ("%23s", ""); FOR_EACH_IMPL (impl, 0)