mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
tests: make leak_check do nothing when compiled without LSAN
This commit is contained in:
parent
7102998dce
commit
e6a9010362
3 changed files with 11 additions and 13 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/24 17:40:48 by khais #+# #+# */
|
||||
/* Updated: 2025/03/04 13:54:03 by khais ### ########.fr */
|
||||
/* Updated: 2025/03/04 15:12:04 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -18,8 +18,6 @@
|
|||
#include "unistd.h"
|
||||
#include <assert.h>
|
||||
|
||||
extern void __lsan_do_leak_check(void);
|
||||
|
||||
static t_cmdlist *parse_command_list(char *input)
|
||||
{
|
||||
ft_dprintf(STDERR_FILENO, "Now checking command list with input [%s]\n", input);
|
||||
|
|
@ -181,20 +179,20 @@ static void test_parse_command_list_invalid_pipeline(void)
|
|||
int main(void)
|
||||
{
|
||||
test_parse_command_list_invalid_pipeline();
|
||||
__lsan_do_leak_check();
|
||||
do_leak_check();
|
||||
test_parse_command_list_empty();
|
||||
__lsan_do_leak_check();
|
||||
do_leak_check();
|
||||
test_parse_command_list_single_pipeline();
|
||||
__lsan_do_leak_check();
|
||||
do_leak_check();
|
||||
test_parse_command_list_simple_and();
|
||||
__lsan_do_leak_check();
|
||||
do_leak_check();
|
||||
test_parse_command_list_simple_or();
|
||||
__lsan_do_leak_check();
|
||||
do_leak_check();
|
||||
test_parse_command_list_triple_or();
|
||||
__lsan_do_leak_check();
|
||||
do_leak_check();
|
||||
test_parse_command_list_triple_both_operators();
|
||||
__lsan_do_leak_check();
|
||||
do_leak_check();
|
||||
test_parse_command_list_quad_both_operators();
|
||||
__lsan_do_leak_check();
|
||||
do_leak_check();
|
||||
return (0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/13 15:21:09 by khais #+# #+# */
|
||||
/* Updated: 2025/03/06 15:30:52 by khais ### ########.fr */
|
||||
/* Updated: 2025/03/09 12:37:10 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/13 15:57:21 by khais #+# #+# */
|
||||
/* Updated: 2025/03/06 15:30:55 by khais ### ########.fr */
|
||||
/* Updated: 2025/03/09 12:36:44 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue