X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=cgi-auth-flexible.git;a=blobdiff_plain;f=tests%2Fwrap;h=99df0f904c5fc5c03c76089af00dcc01ccef9267;hp=937820f4a7c129299c2a088daf91204805700ea3;hb=3eb1b34dd6160ab9e454feb2648ca3ef52d33eaa;hpb=4e743c20f98b7ae5b8170b65c73d1ba60cb183b1 diff --git a/tests/wrap b/tests/wrap index 937820f..99df0f9 100755 --- a/tests/wrap +++ b/tests/wrap @@ -1,13 +1,15 @@ #!/bin/sh set -e cd "$CAFTEST_CAF" -exec 2>>tests/tmp/log -export HTTP_COOKIE=$(cat "tests/tmp/cookie") -export CAFTEST_URL=file:///cgi-bin/wrap +: ${CAFTEST_TMP:=tests/tmp} +export CAFTEST_TMP +exec 2>>$CAFTEST_TMP/wrap.log +export HTTP_COOKIE=$(cat "$CAFTEST_TMP/cookie") +export CAFTEST_URLBASE=file:/// tests/cgi "$@" | perl -pe ' next if m/^$/..0; next unless m/Set-Cookie: (\w+=[^; ]+)/; - my $cf = "tests/tmp/cookie"; + my $cf = "$ENV{CAFTEST_TMP}/cookie"; open C, ">", "$cf.new" or die "$cf $!"; print C $1 or die $!; close C or die $!;