aboutsummaryrefslogtreecommitdiffstats
path: root/tests/blogc-git-receiver/check_pre_receive.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'tests/blogc-git-receiver/check_pre_receive.sh.in')
-rwxr-xr-xtests/blogc-git-receiver/check_pre_receive.sh.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/blogc-git-receiver/check_pre_receive.sh.in b/tests/blogc-git-receiver/check_pre_receive.sh.in
index 10fd4d9..b9aec45 100755
--- a/tests/blogc-git-receiver/check_pre_receive.sh.in
+++ b/tests/blogc-git-receiver/check_pre_receive.sh.in
@@ -143,4 +143,20 @@ grep "echo lol" "${TEMP}/output.txt" &> /dev/null
[[ "${DEST}" != "$(readlink htdocs)" ]]
[[ ! -e "${DEST}" ]]
+DEST="$(readlink htdocs)"
+HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./hooks/pre-receive 2>&1 | tee "${TEMP}/output.txt"
+
+[[ -h htdocs ]]
+[[ "$(cat htdocs/foo.txt)" == "lol" ]]
+[[ "${DEST}" != "$(readlink htdocs)" ]]
+[[ ! -e "${DEST}" ]]
+
+DEST="$(readlink htdocs)"
+HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./hooks/pre-receive 2>&1 | tee "${TEMP}/output.txt"
+
+[[ -h htdocs ]]
+[[ "$(cat htdocs/foo.txt)" == "lol" ]]
+[[ "${DEST}" != "$(readlink htdocs)" ]]
+[[ ! -e "${DEST}" ]]
+
rm "${TEMP}/output.txt"