quote removal: if given null, return null

This commit is contained in:
Khaïs COLIN 2025-03-07 11:08:35 +01:00
parent 0fecded23b
commit 7b76c1a71f
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
2 changed files with 14 additions and 2 deletions

View file

@ -6,7 +6,7 @@
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/28 13:46:56 by khais #+# #+# */
/* Updated: 2025/03/07 10:59:54 by khais ### ########.fr */
/* Updated: 2025/03/07 11:07:59 by khais ### ########.fr */
/* */
/* ************************************************************************** */
@ -35,7 +35,15 @@ static void test_quote_removal_no_quotes_single_word(void)
worddesc_destroy(got_word);
}
static void test_quote_removal_null(void)
{
t_worddesc *word = NULL;
t_worddesc *got_word = remove_quotes(word);
assert(got_word == NULL);
}
int main(void) {
test_quote_removal_no_quotes_single_word();
test_quote_removal_null();
return (0);
}