Add bash app, tests and run_tests file

This commit is contained in:
2025-12-19 15:41:41 +00:00
parent 4c25741089
commit 11d826f896
4 changed files with 54 additions and 0 deletions

19
tests/test_calculator.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
#incarca functia din aplicatie
source ./app/calculator.sh
echo "Test: add 2 + 3"
result=$( add 2 3 )
if [ "$result" -eq 5 ]; then
echo "Test PASSED"
exit 0
else
echo "Test FAILED"
exit 1
fi