go_winter_work_2025/bash/train_bash/task2.sh
Vitaliy Turov 50f600e168
Some checks failed
Deploy to Server (Docker) / deploy (push) Failing after 9s
feature/train_bash (#7)
Reviewed-on: https://git.gocommunity.ru/walleri1/go_winter_work_2025/pulls/7
Co-authored-by: Vitaliy Turov <walleri1@yandex.ru>
Co-committed-by: Vitaliy Turov <walleri1@yandex.ru>
2025-02-15 11:59:59 +03:00

16 lines
293 B
Bash
Executable File

#!/bin/bash
arg1_test=( 2 -3 5 -7 -200 5 -1 -1 )
arg2_test=( 2 3 4 5 100 0 -1 -23 )
result=( 4 0 10 -2 -100 5 -2 -24 )
for i in ${!arg1_test[@]}
do
output=$(./summ ${arg1_test[$i]} ${arg2_test[$i]})
if [ $output -eq ${result[$i]} ]; then
echo "PASS"
else
echo "FAIL"
fi
done