mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
Expansion: fix but still a problem matching '.'
Problem in the coherence of behaviour regarding ownership with star expansion fixed.
This commit is contained in:
parent
da06c0d4e0
commit
b58848e091
4 changed files with 43 additions and 7 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/19 17:52/50 by khais #+# #+# */
|
||||
/* Updated: 2025/03/20 10:36:23 by jguelen ### ########.fr */
|
||||
/* Updated: 2025/03/20 14:47:23 by jguelen ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ static void test_filename_star_expansion(void)
|
|||
//test ., .. and .plop
|
||||
filepattern = create_single_word(".*");
|
||||
expanded = expand_star(filepattern);
|
||||
//assert(wordlist_size(expanded) == 3);
|
||||
assert(wordlist_size(expanded) == 3);
|
||||
//assert_strequal(".", expanded->word->word);
|
||||
//assert_strequal("..", expanded->next->word->word);
|
||||
//assert_strequal(".plop", expanded->next->next->word->word);
|
||||
|
|
@ -176,8 +176,9 @@ static void test_filename_star_expansion(void)
|
|||
//test zero result
|
||||
filepattern = create_single_word("e*x***p*b");
|
||||
expanded = expand_star(filepattern);
|
||||
assert(expanded);
|
||||
assert_strequal(filepattern->word, expanded->word->word);
|
||||
worddesc_destroy(filepattern);
|
||||
assert(!expanded);
|
||||
wordlist_destroy(expanded);
|
||||
do_leak_check();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue