]> gitweb.ps.run Git - ps-cgit/blobdiff - tests/setup.sh
tests: introduce strip_header() helper function
[ps-cgit] / tests / setup.sh
index a573444583dc998c597708f5ec86aab9d5fe4bbf..1d8677a783ec5d5b877a8d2a259c88d36b96ff14 100755 (executable)
@@ -98,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