mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
quote removal: if given null, return null
This commit is contained in:
parent
0fecded23b
commit
7b76c1a71f
2 changed files with 14 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue