- my $in = $reply->as_string;
- run_with_env({PATH => $main_path}, [$mda], \$in);
- local $ENV{GIT_DIR} = $maindir;
- my $rev = `git rev-list HEAD`;
- like($rev, qr/\A[a-f0-9]{40}/, "good revision committed");
- }
-
-}
-
-# obvious failures, first
-{
- local $ENV{HOME} = $home;
- my $res = cgi_run("/", "", "PUT");
- like($res->{head}, qr/Status:\s*405/i, "PUT not allowed");
-
- $res = cgi_run("/");
- like($res->{head}, qr/Status:\s*404/i, "index returns 404");
-}
-
-# atom feeds
-{
- local $ENV{HOME} = $home;
- my $res = cgi_run("/test/atom.xml");
- like($res->{body}, qr/<title>test for public-inbox/,
- "set title in XML feed");
- like($res->{body},
- qr!http://test\.example\.com/test/m/blah%40example\.com!,
- "link id set");
- like($res->{body}, qr/what\?/, "reply included");
-}
-
-# indices
-{
- local $ENV{HOME} = $home;
- my $res = cgi_run("/test/");
- like($res->{head}, qr/Status: 200 OK/, "index returns 200");
-
- my $idx = cgi_run("/test/index.html");
- $idx->{body} =~ s!/index.html(\?r=)!/$1!g; # dirty...
- $idx->{body} = [ split(/\n/, $idx->{body}) ];
- $res->{body} = [ split(/\n/, $res->{body}) ];
- is_deeply($res, $idx,
- '/$LISTNAME/ and /$LISTNAME/index.html are nearly identical');
- # more checks in t/feed.t
-}