Diff options
Diffstat (limited to 'tests')
-rwxr-xr-xtests/t0301-security.sh4
-rwxr-xr-xtests/t0303-robustness.sh8
2 files changed, 3 insertions, 9 deletions
diff --git a/tests/t0301-security.sh b/tests/t0301-security.sh
index be87a2b..73af518 100755
--- a/tests/t0301-security.sh
+++ b/tests/t0301-security.sh
@@ -389,8 +389,7 @@ test_expect_success 'set up the advisory fixtures' '
) &&
mkdir -p readme &&
printf "readme text\n" >readme/README &&
- cat >auth.sh <<-\EOF &&
- #!/bin/sh
+ write_script auth.sh <<-\EOF &&
case "$1" in
authenticate-post)
cat >/dev/null
@@ -399,7 +398,6 @@ test_expect_success 'set up the advisory fixtures' '
esac
exit 1
EOF
- chmod +x auth.sh &&
{
echo "virtual-root=/" &&
echo "cache-size=0" &&
diff --git a/tests/t0303-robustness.sh b/tests/t0303-robustness.sh
index 3f00e38..5fc7002 100755
--- a/tests/t0303-robustness.sh
+++ b/tests/t0303-robustness.sh
@@ -413,8 +413,7 @@ test_expect_success 'a corrupt blob in a collected diff answers the error' '
'
test_expect_success 'a filter pipeline sees the default SIGPIPE disposition' '
- cat >pipe.sh <<-\EOF &&
- #!/bin/sh
+ write_script pipe.sh <<-\EOF &&
n=0
while test $n -lt 20000
do
@@ -422,7 +421,6 @@ test_expect_success 'a filter pipeline sees the default SIGPIPE disposition' '
n=$((n + 1))
done | head -c 5
EOF
- chmod +x pipe.sh &&
{
echo "source-filter=exec:$PWD/pipe.sh" &&
cat robrc
@@ -648,11 +646,9 @@ test_expect_success 'a client that disconnects ends the request quietly' '
# shared with other visitors has to be told, while a site without a filter
# keeps its pages free of any such header.
test_expect_success 'pages behind an auth filter are marked private' '
- cat >letin.sh <<-\EOF &&
- #!/bin/sh
+ write_script letin.sh <<-\EOF &&
exit 1
EOF
- chmod +x letin.sh &&
{
echo "auth-filter=exec:$PWD/letin.sh" &&
cat robrc