string: Add tests for strndup (BZ #30266)
commit0c48aa0551151ea201f7f528492e89a0b08a6890
authorJoe Simmons-Talbott <josimmon@redhat.com>
Fri, 21 Apr 2023 13:24:24 +0000 (21 09:24 -0400)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 21 Apr 2023 13:50:42 +0000 (21 10:50 -0300)
treec31ae037cb2d5613832d9b64b826394c6d49f5f4
parenteaaad78db41724e5a18a42becb238bfc4e683998
string: Add tests for strndup (BZ #30266)

Copy strncpy tests for strndup.  Covers some basic testcases with random
strings.  Remove tests that set the destination's bytes and checked the
resulting buffer's bytes.  Remove wide character test support since
wcsndup() doesn't exist.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
string/Makefile
string/test-strndup.c [new file with mode: 0644]