🐙 Templated web page generator for your git repositories
git clone https://github.com/m-col/gitja
Files | Refs | Readme | License

Commit 09d784a0035847a9be309761b1d0464130fa6bef
Parent: 982da1b9be002de5e4bd94f07f7ec62ddd2bc91a
Author: mcol <mcol@posteo.net>
Date: 2021-11-26 23:30:52 +0000
Committer: mcol <mcol@posteo.net>
Committed: 2021-11-26 23:30:52 +0000

remove unnecessary lines from test script

test/test.sh Modified

@@ -23,7 +23,7 @@
     exit 1
 fi
 
-let errors="0" "1"
+let errors="0"
 EXPECTED="test/expected"
 RESULT="test/result"
 rm -fr "$RESULT"
@@ -39,12 +39,7 @@
     "gitserve/file/test.templates.style.css.html"
 )
 
-finish() {
-    rm -r "$RESULT"
-    exit $1
-}
-
-stack run -- -c test/config.dhall -q || finish 1
+stack run -- -c test/config.dhall -q || exit 1
 
 for test in "${TESTS[@]}"
 do
@@ -63,10 +58,11 @@
 case "$errors" in
     0)
 	echo "All good!"
-	finish 0
 	;;
     *)
 	echo "Had this many errors: $errors"
-	finish $errors
 	;;
 esac
+
+rm -r "$RESULT"
+exit $errors