test_executor.c

Comprehensive test suite for the executor module.

Tests: exec_utils, command_search, redirections, heredoc, logical operators, pipeline, subshell, block, background, simple command execution (builtins + externals).

Uses functional stubs from test_stubs.c for dependencies.

Functions

void stub_shell_init(t_shell *shell)
void stub_shell_cleanup(t_shell *shell)
static int fork_exit_and_get(int code)
static int fork_signal_and_get(int sig)
static void test_get_exit_status(void)
static void test_split_assignment(void)
static void test_heredoc(void)
static void test_redirections_output(void)
static void test_redirections_append(void)
static void test_redirections_input(void)
static void test_redirections_heredoc_in_list(void)
static void test_redirections_bad_file(void)
static void test_redirections_save_restore(void)
static t_ast *make_true_cmd(void)
static t_ast *make_false_cmd(void)
static void free_cmd_ast(t_ast *ast)
static t_ast *make_echo_to_file(const char *filepath, const char *text)
static void free_echo_ast(t_ast *ast)
static void test_execute_and(void)
static void test_execute_or(void)
static void test_execute_sequence(void)
static void test_execute_external_command(void)
static void test_execute_builtin_command(void)
static void test_execute_pipeline(void)
static void test_execute_pipeline_three(void)
static void test_pipeline_exit_status(void)
static void test_execute_subshell(void)
static void test_execute_subshell_isolation(void)
static void test_execute_block(void)
static void test_execute_background(void)
static void test_executor_dispatch(void)
static void test_complex_logical_chains(void)
static void test_pipeline_with_heredoc(void)
static void test_sequence_mixed(void)
void test_executor_suite(void)