+ test_psgi($app, sub {
+ my ($cb) = @_;
+ # for a while, we used to support /$INBOX/$X40/
+ # when we "compressed" long Message-IDs to SHA-1
+ # Now we're stuck supporting them forever :<
+ foreach my $path (@ls) {
+ $path =~ tr!/!!d;
+ my $from = "http://example.com/test/$path/";
+ my $res = $cb->(GET($from));
+ is(301, $res->code, 'is permanent redirect');
+ like($res->header('Location'),
+ qr!/test/blah\@example\.com/!,
+ 'redirect from x40 MIDs works');
+ }
+ });