]> gitweb.ps.run Git - ps-cgit/blobdiff - tests/setup.sh
t0108: Compare output with git-format-patch(1)
[ps-cgit] / tests / setup.sh
index 81e7220662800a46fb697c1f7a35a4ee45dceb55..1d8677a783ec5d5b877a8d2a259c88d36b96ff14 100755 (executable)
@@ -16,6 +16,7 @@
 # run_test 'repo summary' 'cgit_url "/foo" | tidy -e'
 
 : ${TEST_DIRECTORY=$(pwd)/../git/t}
+: ${TEST_OUTPUT_DIRECTORY=$(pwd)}
 TEST_NO_CREATE_REPO=YesPlease
 . "$TEST_DIRECTORY"/test-lib.sh
 
@@ -97,4 +98,12 @@ cgit_url()
        CGIT_CONFIG="$PWD/cgitrc" QUERY_STRING="url=$1" cgit
 }
 
+strip_headers () {
+       while read -r line
+       do
+               test -z "$line" && break
+       done
+       cat
+}
+
 test -z "$CGIT_TEST_NO_CREATE_REPOS" && setup_repos