build: Auto-add example tests outputs. (#2339)

This commit allow the file to be auto added when it doesn't exist. This
save the useless process of writing it by hand.
This commit is contained in:
Emmanuel Lepage Vallée 2018-08-06 09:30:59 -04:00 committed by GitHub
parent 73b519d38b
commit e889caba91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,12 @@ then
exit 1
fi
# Automatically add the output for new examples
if [ ! -e "${expected_output}" ]
then
cp "${file_stdout}" "${expected_output}"
fi
# Check if we got the output we wanted
if ! cmp --silent "${file_stdout}" "${expected_output}"
then