GCC Code Coverage Report


Directory: ./
File: src/builtins/endif.c
Date: 2024-06-05 00:36:48
Exec Total Coverage
Lines: 5 5 100.0%
Functions: 1 1 100.0%
Branches: 2 2 100.0%

Line Branch Exec Source
1 /*
2 ** EPITECH PROJECT, 2024
3 ** 42sh
4 ** File description:
5 ** The file containing the endif builtin
6 */
7 /**
8 * @file endif.c
9 * @brief The file containing the endif builtin
10 */
11
12 #include "../../include/myshell.h"
13
14 /**
15 * @brief The endif builtin
16 * @param mysh The shell structure
17 * @return <b>int</b> <u>0</u> if the command succeed, <u>1</u> otherwise
18 */
19 2 int exec_endif(mysh_t *mysh)
20 {
21
2/2
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
2 if (mysh->args[1] != NULL) {
22 1 my_putstr_error("endif: Too many arguments.\n");
23 1 return 1;
24 }
25 1 return 0;
26 }
27