There was a problem fetching linked pipelines.
Commit f1ed2619 authored by Caleb C. Sander's avatar Caleb C. Sander
Browse files

Add .gitignore

parent 0ee03f20
Pipeline #29759 canceled with stage
Showing with 9 additions and 2 deletions
+9 -2
a.out
longest
mywc
#!/bin/bash
COMPILE_CMD='clang -g -o longest longest.c' COMPILE_CMD='clang -g -o longest longest.c'
STUDENT_CMD='./longest $@' STUDENT_CMD='./longest $@'
REF_CMD='cat $@ | sed "s/ /\n/g" | sort | uniq | awk "{print length, \$0}" | sort -nr | head -n 1 | sed -e "s/.* //"' REF_CMD='cat $@ | sed "s/ /\n/g" | sort | uniq | awk "{print length, \$0}" | sort -nr | head -n 1 | sed -e "s/.* //"'
...@@ -23,7 +25,7 @@ function test() { ...@@ -23,7 +25,7 @@ function test() {
diff <(eval $REF_CMD) .output; diff <(eval $REF_CMD) .output;
diff_ret=$? diff_ret=$?
if [ $diff_ret -eq 0 ] && [ $leak -eq 0 ] && [ $valgrind_error -ne 101 ]; then if [ $diff_ret -eq 0 ] && [ $leak -eq 0 ] && [ $valgrind_error -ne 101 ]; then
echo "$1: Passed"; echo "$1: Passed";
elif [ $valgrind_error -eq 101 ]; then elif [ $valgrind_error -eq 101 ]; then
echo "$1: Execution Error" echo "$1: Execution Error"
elif [ $diff_ret -ne 0 ]; then elif [ $diff_ret -ne 0 ]; then
......
#!/bin/bash
COMPILE_CMD='clang -g -o mywc wc.c' COMPILE_CMD='clang -g -o mywc wc.c'
STUDENT_CMD='./mywc $@' STUDENT_CMD='./mywc $@'
REF_CMD='wc -l $@ 2>&1' REF_CMD='wc -l $@ 2>&1'
...@@ -22,7 +24,7 @@ function test() { ...@@ -22,7 +24,7 @@ function test() {
diff <(eval $REF_CMD) .output; diff <(eval $REF_CMD) .output;
diff_ret=$? diff_ret=$?
if [ $diff_ret -eq 0 ] && [ $leak -eq 0 ] && [ $valgrind_error -ne 101 ]; then if [ $diff_ret -eq 0 ] && [ $leak -eq 0 ] && [ $valgrind_error -ne 101 ]; then
echo "$1: Passed"; echo "$1: Passed";
elif [ $valgrind_error -eq 101 ]; then elif [ $valgrind_error -eq 101 ]; then
echo "$1: Execution Error" echo "$1: Execution Error"
elif [ $diff_ret -ne 0 ]; then elif [ $diff_ret -ne 0 ]; then
......
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