]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/cgi.t
cgi: implement get_mid_txt
[public-inbox.git] / t / cgi.t
diff --git a/t/cgi.t b/t/cgi.t
index 3ba74f30cb10d03663a943f6690990191606ce8f..a19f2cf11ab9fe8f367ce69ab942fa447846d48b 100644 (file)
--- a/t/cgi.t
+++ b/t/cgi.t
@@ -122,6 +122,16 @@ EOF
        # more checks in t/feed.t
 }
 
+
+{
+       local $ENV{HOME} = $home;
+       my $res = cgi_run("/test/m/blahblah\@example.com.txt");
+       like($res->{body}, qr/Message-Id: <blahblah\@example\.com>/,
+               "mid.txt hit");
+       $res = cgi_run("/test/m/blahblah\@example.con.txt");
+       like($res->{head}, qr/Status: 404 Not Found/, "mid.txt miss");
+}
+
 done_testing();
 
 sub run_with_env {