mirror of
https://github.com/zama-ai/concrete.git
synced 2026-01-13 06:48:02 -05:00
20 lines
421 B
Bash
Executable File
20 lines
421 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# This file tests that the example is working
|
|
|
|
shell_blocks=$(sed -n '/^```sh/,/^```/ p' < README.md | sed '/^```sh/d' | sed '/^```/d')
|
|
|
|
set -e
|
|
output=$(eval "$shell_blocks" 2>&1) || echo "$output"
|
|
|
|
result=$(echo "$output" | grep "result: " | sed 's/result: //g')
|
|
|
|
expected="31"
|
|
if [ $result -eq $expected ]
|
|
then
|
|
exit 0
|
|
else
|
|
echo "expected result to be $expected, but result was $result"
|
|
exit 1
|
|
fi
|