add unit tests for str_copy