# and intentionally bad commas (e.g. "Content-Length: 3, 3")
if (0) {
require Plack::HTTPParser; # XS or pure Perl
- require Data::Dumper;
Plack::HTTPParser::parse_http_request($req, my $env = {});
- diag Data::Dumper::Dumper($env); # "Content-Length: 3, 3"
+ diag explain($env); # "Content-Length: 3, 3"
}
my $conn = conn_for($sock, '1.1 Content-Length dupe');
$conn->write($req);
is($envelope->{messageid}, '<testmessage@example.com>', 'messageid');
is(scalar @{$envelope->{to}}, 1, 'one {to} header');
# *sigh* too much to verify...
- #use Data::Dumper; diag Dumper($envelope);
+ # explain($envelope);
$ret = $mic->fetch_hash($r, 'FLAGS') or BAIL_OUT "FETCH $@";
is_deeply($ret->{1}->{FLAGS}, '', 'no flags');
use_ok 'PublicInbox::NNTP';
use PublicInbox::Config;
use POSIX qw(strftime);
-use Data::Dumper;
{
- my $quote_str = sub {
- my ($orig) = @_;
- my (undef, $s) = split(/ = /, Dumper($orig), 2);
- $s // diag explain(['$s undefined, $orig = ', $orig]);
- $s =~ s/;\n//;
- $s;
- };
-
my $wm_prepare = sub {
my ($wm) = @_;
my $orig = qq{'$wm'};
PublicInbox::NNTP::wildmat2re($_[0]);
- my $new = $quote_str->($_[0]);
+ my $new = explain($_[0]);
($orig, $new);
};