-REQUEST_METHOD=post CAHTEST_HOME=`pwd` ./test.cgi ; echo
+REQUEST_METHOD=post CAFTEST_CAF=`pwd` tests/cgi ; echo
-CAFTEST_URL=file:/cgi-bin/test-wrap CAHTEST_HOME=`pwd` w3m -cookie -config /dev/null -o cgi_bin=`pwd` file:///cgi-bin/test-wrap
+mkdir tests/tmp
+CAFTEST_CAF=`pwd` w3m -cookie -config /dev/null -o cgi_bin=`pwd`/tests file:///cgi-bin/wrap
update last in db when we return undef from check_divert
#use Carp::Always;
$SIG{__DIE__} = sub { Carp::confess(@_) };
-my $dump = "$ENV{'CAHTEST_HOME'}/test-data";
+my $dump = "$ENV{'CAFTEST_CAF'}/tests/tmp";
my @verifier_params =(
username_password_error => sub {
#!/bin/sh
set -e
-exec 2>>"$CAHTEST_HOME/test-data/log"
-export HTTP_COOKIE=$(cat "$CAHTEST_HOME/test-data/cookie")
-./test.cgi "$@" | perl -pe '
+cd "$CAFTEST_CAF"
+exec 2>>tests/tmp/log
+export HTTP_COOKIE=$(cat "tests/tmp/cookie")
+export CAFTEST_URL=file:///cgi-bin/wrap
+tests/cgi "$@" | perl -pe '
next if m/^$/..0;
next unless m/Set-Cookie: (\w+=[^; ]+)/;
- my $cf = "$ENV{CAHTEST_HOME}/test-data/cookie";
+ my $cf = "tests/tmp/cookie";
open C, ">", "$cf.new" or die "$cf $!";
print C $1 or die $!;
close C or die $!;