]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/psgi_scan_all.t
mda: hoist out mda_filter_adjust
[public-inbox.git] / t / psgi_scan_all.t
index 2f54c8207578303bcc92f06facf880d19a388c4d..707807a7f0ac21caf5795facabeaaa009dec1be2 100644 (file)
@@ -14,15 +14,17 @@ foreach my $mod (@mods) {
 use_ok 'PublicInbox::V2Writable';
 foreach my $mod (@mods) { use_ok $mod; }
 my $tmp = tempdir('pi-scan_all-XXXXXX', TMPDIR => 1, CLEANUP => 1);
-my $cfg = {};
+my $cfg = '';
 
 foreach my $i (1..2) {
        my $cfgpfx = "publicinbox.test-$i";
-       my $addr = $cfg->{"$cfgpfx.address"} = "test-$i\@example.com";
-       my $mainrepo = $cfg->{"$cfgpfx.mainrepo"} = "$tmp/$i";
-       $cfg->{"$cfgpfx.url"} = "http://example.com/$i";
+       my $addr = "test-$i\@example.com";
+       my $inboxdir = "$tmp/$i";
+       $cfg .= "$cfgpfx.address=$addr\n";
+       $cfg .= "$cfgpfx.inboxdir=$inboxdir\n";
+       $cfg .= "$cfgpfx.url=http://example.com/$i\n";
        my $opt = {
-               mainrepo => $mainrepo,
+               inboxdir => $inboxdir,
                name => "test-$i",
                version => 2,
                indexlevel => 'basic',
@@ -45,7 +47,7 @@ EOF
        ok($im->add($mime), "added message to $i");
        $im->done;
 }
-my $config = PublicInbox::Config->new($cfg);
+my $config = PublicInbox::Config->new(\$cfg);
 use_ok 'PublicInbox::WWW';
 my $www = PublicInbox::WWW->new($config);