Commit f065f128 authored by Adam Blank's avatar Adam Blank
Browse files

Update test-strsplit

parent eb94c018
Showing with 3 additions and 3 deletions
+3 -3
......@@ -13,7 +13,7 @@ function compile() {
function test() {
STU_CMD=$(eval echo $STUDENT_CMD)
eval "valgrind --error-exitcode=1337 --log-file=.valgrind-output --leak-check=full --show-leak-kinds=all $STU_CMD &> .output";
eval "valgrind --error-exitcode=101 --log-file=.valgrind-output --leak-check=full --show-leak-kinds=all $STU_CMD &> .output";
valgrind_error=$?
if grep "All heap blocks were freed -- no leaks are possible" .valgrind-output > /dev/null; then
leak=0
......@@ -22,9 +22,9 @@ function test() {
fi
diff <(eval $REF_CMD) .output;
diff_ret=$?
if [ $diff_ret -eq 0 ] && [ $leak -eq 0 ] && [ $valgrind_error -ne 1337 ]; then
if [ $diff_ret -eq 0 ] && [ $leak -eq 0 ] && [ $valgrind_error -ne 101 ]; then
echo "$1: Passed";
elif [ $valgrind_error -eq 1337 ]; then
elif [ $valgrind_error -eq 101 ]; then
echo "$1: Execution Error"
elif [ $diff_ret -ne 0 ]; then
echo "$1: Failed";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment