Update Testing authored by Fabian Nuraddin Alexander Gabel's avatar Fabian Nuraddin Alexander Gabel
......@@ -10,7 +10,41 @@ Each test has 4 stages:
* Check the result, usually via a [`diff`](https://en.wikipedia.org/wiki/Diff) command.
* Exit with exit code `1` if script is failed or continue with next test.
Example taken from `test_preproc_wg.sh`:
## Plain template
Use this template in order to register new tests; replace `NN` and `Description` accordingly:
```bash
```bash
#BEGIN Test NN: Description
T=NN
#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 NN
```
## Concrete Example
From `test_preproc_wg.sh`:
```bash
#BEGIN Test 1: Preprocessor for Working Group
......
......