18 lines
618 B
Bash
Executable File
18 lines
618 B
Bash
Executable File
#!/bin/bash
|
|
# Verify Fibonacci script execution
|
|
set -e
|
|
|
|
# Check output file exists and has 20 Fibonacci numbers (21 lines including header)
|
|
[ $(wc -l < /root/.hermes/wizard-outputs/spark/fibonacci_output.txt) -eq 21 ]
|
|
|
|
# Check verification file exists
|
|
[ -f /root/.hermes/wizard-outputs/spark/verification.txt ]
|
|
|
|
# Verify the sum is correct (sum of first 20 Fibonacci = 10945)
|
|
grep -q "Sum of first 20: 10945" /root/.hermes/wizard-outputs/spark/verification.txt
|
|
|
|
# Verify last number is 4181 (F(20))
|
|
grep -q "Last number: 4181" /root/.hermes/wizard-outputs/spark/verification.txt
|
|
|
|
echo "All verifications passed"
|
|
exit 0 |