Add comments to test.sh for better navigation.
This commit is contained in:
4
test.sh
4
test.sh
@@ -17,6 +17,7 @@ fi
|
|||||||
tests=0
|
tests=0
|
||||||
passed=0
|
passed=0
|
||||||
|
|
||||||
|
## TEST 1
|
||||||
((tests++))
|
((tests++))
|
||||||
echo -n "${tests}: Find all prime numbers before 70..."
|
echo -n "${tests}: Find all prime numbers before 70..."
|
||||||
expect="2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 "
|
expect="2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 "
|
||||||
@@ -29,6 +30,7 @@ else
|
|||||||
echo " FAIL"
|
echo " FAIL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
## TEST 2
|
||||||
((tests++))
|
((tests++))
|
||||||
echo -n "${tests}: 11 is prime..."
|
echo -n "${tests}: 11 is prime..."
|
||||||
if "$BINARY" -t 11
|
if "$BINARY" -t 11
|
||||||
@@ -39,6 +41,7 @@ else
|
|||||||
echo " FAIL"
|
echo " FAIL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
## TEST 3
|
||||||
((tests++))
|
((tests++))
|
||||||
echo -n "${tests}: 9 is not prime..."
|
echo -n "${tests}: 9 is not prime..."
|
||||||
if ! "$BINARY" -t 9
|
if ! "$BINARY" -t 9
|
||||||
@@ -49,4 +52,5 @@ else
|
|||||||
echo " FAIL"
|
echo " FAIL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
## RESULTS
|
||||||
echo "Results: $passed/$tests"
|
echo "Results: $passed/$tests"
|
||||||
|
|||||||
Reference in New Issue
Block a user