summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
Diffstat (limited to 'check')
-rwxr-xr-xcheck5
1 files changed, 4 insertions, 1 deletions
diff --git a/check b/check
index 4bc0e07..1c41110 100755
--- a/check
+++ b/check
@@ -28,7 +28,10 @@ case $lang in
esac
result=$(cat $data_path | $cmd)
+diff=$(echo "$result" | diff $aoc_path/data/$4.ans -)
+code=$?
-echo "$result" | diff $aoc_path/data/$4.ans - && echo Solved wtih $lang!
+[ $code -eq 0 ] && echo Solved with $lang! || echo "$diff"
echo "\n---stdout---"
echo "$result"
+exit $code