EOF
my $in = $simple->as_string;
run_with_env({PATH => $main_path}, [$mda], \$in);
- local $ENV{GIT_DIR} = $maindir;
- my $rev = `git rev-list HEAD`;
+ my $rev = `git --git-dir=$maindir rev-list HEAD`;
like($rev, qr/\A[a-f0-9]{40}/, "good revision committed");
}
EOF
my $in = $reply->as_string;
run_with_env({PATH => $main_path}, [$mda], \$in);
- local $ENV{GIT_DIR} = $maindir;
- my $rev = `git rev-list HEAD`;
+ my $rev = `git --git-dir=$maindir rev-list HEAD`;
like($rev, qr/\A[a-f0-9]{40}/, "good revision committed");
}
local $ENV{ORIGINAL_RECIPIENT} = $addr;
run_with_env({PATH => $main_path}, [$mda], \$in);
}
- local $ENV{GIT_DIR} = $maindir;
my $res = cgi_run("/test/slashy%2fasdf%40example.com/raw");
like($res->{body}, qr/Message-Id: <\Q$slashy_mid\E>/,
like($res->{head}, qr/Status: 300 Multiple Choices/, "mid html miss");
$res = cgi_run("/test/blahblah\@example.com/f/");
- like($res->{body}, qr/\A<html>/, "mid html");
- like($res->{head}, qr/Status: 200 OK/, "200 response");
- $res = cgi_run("/test/blahblah\@example.con/f/");
+ like($res->{head}, qr/Status: 301 Moved/, "301 response");
+ like($res->{head},
+ qr!^Location: http://[^/]+/test/blahblah%40example\.com/\r\n!ms,
+ '301 redirect location');
+ $res = cgi_run("/test/blahblah\@example.con/");
like($res->{head}, qr/Status: 300 Multiple Choices/, "mid html miss");
$res = cgi_run("/test/");