Update Testing authored by Fabian Nuraddin Alexander Gabel's avatar Fabian Nuraddin Alexander Gabel
...@@ -17,8 +17,8 @@ Use this template in order to register new tests; replace `NN` and `Description` ...@@ -17,8 +17,8 @@ Use this template in order to register new tests; replace `NN` and `Description`
```bash ```bash
```bash ```bash
#BEGIN Test NN: Description #BEGIN Test 1: Description
T=NN T=1
#echo "##################################################" #echo "##################################################"
echo "Test $T: Description" echo "Test $T: Description"
#echo "##################################################" #echo "##################################################"
...@@ -39,7 +39,36 @@ then ...@@ -39,7 +39,36 @@ then
else else
echo "Test $T: passed." echo "Test $T: passed."
fi fi
#END Test NN #END Test 1
#BEGIN Test 2: Description
T=2
#echo "##################################################"
echo "Test $T: Description"
#echo "##################################################"
# preparation
# run script
#check results
DIFF=
#echo "--------------------------------------------------"
if [ "$DIFF" != "" ] && [ -f "" ]
then
echo "Test $T: failed"
exit 1
else
echo "Test $T: passed."
fi
#END Test 2
...
#don't modify below, these should be the last lines (errors exit earlier)
echo "--------------------------------------------------"
echo "ALL $T tests in $0 PASSED."
exit 0
``` ```
## Concrete Example ## Concrete Example
...@@ -74,3 +103,4 @@ else ...@@ -74,3 +103,4 @@ else
echo "Test $T: passed." echo "Test $T: passed."
fi fi
#END Test 1 #END Test 1
```
\ No newline at end of file