diff --git a/libft_test/ft_bzero_test.c b/libft_test/ft_bzero_test.c index 44f6214..de2bccf 100755 --- a/libft_test/ft_bzero_test.c +++ b/libft_test/ft_bzero_test.c @@ -28,13 +28,13 @@ fi catch stout sterr "${tmp_out}" printf "%s\n" "Testing ${SRC}" -printf "Expected Output --> Test Output\n" diff_out="$(diff --expand-tabs --left-column --width="60" --side-by-side --label="Expected Output" --label=" Test Output" -- <(printf '%s\n' "${sterr}") <(printf '%s\n' "${stout}") && printf '%s\n' "0" || printf '%s\n' "1")" if [ "$(printf '%s' "${diff_out}" | tail -1)" = "0" ]; then printf "\e[102;30m%s\e[m\n" "All tests passed" exit_status="0" else + printf "Expected Output --> Test Output\n" printf '%s' "${diff_out}" | head -n -1 printf "\e[101;37m%s\e[m\n" "At least one test failed" exit_status="1" diff --git a/libft_test/ft_isalnum_test.c b/libft_test/ft_isalnum_test.c index bdb4c56..3b1c465 100755 --- a/libft_test/ft_isalnum_test.c +++ b/libft_test/ft_isalnum_test.c @@ -28,13 +28,13 @@ fi catch stout sterr "${tmp_out}" printf "%s\n" "Testing ${SRC}" -printf "Expected Output --> Test Output\n" diff_out="$(diff --expand-tabs --left-column --width="60" --side-by-side --label="Expected Output" --label=" Test Output" -- <(printf '%s\n' "${sterr}") <(printf '%s\n' "${stout}") && printf '%s\n' "0" || printf '%s\n' "1")" if [ "$(printf '%s' "${diff_out}" | tail -1)" = "0" ]; then printf "\e[102;30m%s\e[m\n" "All tests passed" exit_status="0" else + printf "Expected Output --> Test Output\n" printf '%s' "${diff_out}" | head -n -1 printf "\e[101;37m%s\e[m\n" "At least one test failed" exit_status="1" diff --git a/libft_test/ft_isalpha_test.c b/libft_test/ft_isalpha_test.c index 003b5a0..592eb16 100755 --- a/libft_test/ft_isalpha_test.c +++ b/libft_test/ft_isalpha_test.c @@ -28,13 +28,13 @@ fi catch stout sterr "${tmp_out}" printf "%s\n" "Testing ${SRC}" -printf "Expected Output --> Test Output\n" diff_out="$(diff --expand-tabs --left-column --width="60" --side-by-side --label="Expected Output" --label=" Test Output" -- <(printf '%s\n' "${sterr}") <(printf '%s\n' "${stout}") && printf '%s\n' "0" || printf '%s\n' "1")" if [ "$(printf '%s' "${diff_out}" | tail -1)" = "0" ]; then printf "\e[102;30m%s\e[m\n" "All tests passed" exit_status="0" else + printf "Expected Output --> Test Output\n" printf '%s' "${diff_out}" | head -n -1 printf "\e[101;37m%s\e[m\n" "At least one test failed" exit_status="1" diff --git a/libft_test/ft_isascii_test.c b/libft_test/ft_isascii_test.c index 359b831..16c4e88 100755 --- a/libft_test/ft_isascii_test.c +++ b/libft_test/ft_isascii_test.c @@ -28,13 +28,13 @@ fi catch stout sterr "${tmp_out}" printf "%s\n" "Testing ${SRC}" -printf "Expected Output --> Test Output\n" diff_out="$(diff --expand-tabs --left-column --width="60" --side-by-side --label="Expected Output" --label=" Test Output" -- <(printf '%s\n' "${sterr}") <(printf '%s\n' "${stout}") && printf '%s\n' "0" || printf '%s\n' "1")" if [ "$(printf '%s' "${diff_out}" | tail -1)" = "0" ]; then printf "\e[102;30m%s\e[m\n" "All tests passed" exit_status="0" else + printf "Expected Output --> Test Output\n" printf '%s' "${diff_out}" | head -n -1 printf "\e[101;37m%s\e[m\n" "At least one test failed" exit_status="1" diff --git a/libft_test/ft_isdigit_test.c b/libft_test/ft_isdigit_test.c index de26690..53c4f47 100755 --- a/libft_test/ft_isdigit_test.c +++ b/libft_test/ft_isdigit_test.c @@ -28,13 +28,13 @@ fi catch stout sterr "${tmp_out}" printf "%s\n" "Testing ${SRC}" -printf "Expected Output --> Test Output\n" diff_out="$(diff --expand-tabs --left-column --width="60" --side-by-side --label="Expected Output" --label=" Test Output" -- <(printf '%s\n' "${sterr}") <(printf '%s\n' "${stout}") && printf '%s\n' "0" || printf '%s\n' "1")" if [ "$(printf '%s' "${diff_out}" | tail -1)" = "0" ]; then printf "\e[102;30m%s\e[m\n" "All tests passed" exit_status="0" else + printf "Expected Output --> Test Output\n" printf '%s' "${diff_out}" | head -n -1 printf "\e[101;37m%s\e[m\n" "At least one test failed" exit_status="1" diff --git a/libft_test/ft_isprint_test.c b/libft_test/ft_isprint_test.c index 72f89d4..a9a586c 100755 --- a/libft_test/ft_isprint_test.c +++ b/libft_test/ft_isprint_test.c @@ -28,13 +28,13 @@ fi catch stout sterr "${tmp_out}" printf "%s\n" "Testing ${SRC}" -printf "Expected Output --> Test Output\n" diff_out="$(diff --expand-tabs --left-column --width="60" --side-by-side --label="Expected Output" --label=" Test Output" -- <(printf '%s\n' "${sterr}") <(printf '%s\n' "${stout}") && printf '%s\n' "0" || printf '%s\n' "1")" if [ "$(printf '%s' "${diff_out}" | tail -1)" = "0" ]; then printf "\e[102;30m%s\e[m\n" "All tests passed" exit_status="0" else + printf "Expected Output --> Test Output\n" printf '%s' "${diff_out}" | head -n -1 printf "\e[101;37m%s\e[m\n" "At least one test failed" exit_status="1" diff --git a/libft_test/ft_memset_test.c b/libft_test/ft_memset_test.c index 12ca7da..c9e4b33 100755 --- a/libft_test/ft_memset_test.c +++ b/libft_test/ft_memset_test.c @@ -28,13 +28,13 @@ fi catch stout sterr "${tmp_out}" printf "%s\n" "Testing ${SRC}" -printf "Expected Output --> Test Output\n" diff_out="$(diff --expand-tabs --left-column --width="60" --side-by-side --label="Expected Output" --label=" Test Output" -- <(printf '%s\n' "${sterr}") <(printf '%s\n' "${stout}") && printf '%s\n' "0" || printf '%s\n' "1")" if [ "$(printf '%s' "${diff_out}" | tail -1)" = "0" ]; then printf "\e[102;30m%s\e[m\n" "All tests passed" exit_status="0" else + printf "Expected Output --> Test Output\n" printf '%s' "${diff_out}" | head -n -1 printf "\e[101;37m%s\e[m\n" "At least one test failed" exit_status="1" diff --git a/libft_test/ft_strlen_test.c b/libft_test/ft_strlen_test.c index f94c9ad..4c42e72 100755 --- a/libft_test/ft_strlen_test.c +++ b/libft_test/ft_strlen_test.c @@ -28,13 +28,13 @@ fi catch stout sterr "${tmp_out}" printf "%s\n" "Testing ${SRC}" -printf "Expected Output --> Test Output\n" diff_out="$(diff --expand-tabs --left-column --width="60" --side-by-side --label="Expected Output" --label=" Test Output" -- <(printf '%s\n' "${sterr}") <(printf '%s\n' "${stout}") && printf '%s\n' "0" || printf '%s\n' "1")" if [ "$(printf '%s' "${diff_out}" | tail -1)" = "0" ]; then printf "\e[102;30m%s\e[m\n" "All tests passed" exit_status="0" else + printf "Expected Output --> Test Output\n" printf '%s' "${diff_out}" | head -n -1 printf "\e[101;37m%s\e[m\n" "At least one test failed" exit_status="1"