icp/oer/courses/c-newcomers/sections/02-dice/05-distribution/test.sh

14 lines
173 B
Bash
Raw Normal View History

2018-05-05 22:18:02 +00:00
#!/bin/bash
regex='^2 (.*?)28 (.*?)$'
program_out=$(./program)
if [[ "$program_out" =~ $regex ]]
then
echo "PASS" $program_out
else
echo "FAIL " $program_out
fi