X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fconfig.t;h=88ed62a4c05f55e509f96e6fff846a3f29691ab0;hb=f76f265a851944b5dedcc3be5f3b5224b6ebda89;hp=3ff7b3706c54672ea7fa63cbfd6c9d42311af191;hpb=67e53d0875a7efcb958fb9680ea87216adaf06cc;p=public-inbox.git diff --git a/t/config.t b/t/config.t index 3ff7b370..88ed62a4 100644 --- a/t/config.t +++ b/t/config.t @@ -1,4 +1,4 @@ -# Copyright (C) 2014, Eric Wong and all contributors +# Copyright (C) 2014-2015 all contributors # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt) use strict; use warnings; @@ -25,15 +25,25 @@ my $tmpdir = tempdir(CLEANUP => 1); ok(-r $f, "$f is readable"); my $cfg = PublicInbox::Config->new($f); - is_deeply($cfg->lookup('bugs@public-inbox.org'), { - 'failrepo' => '/home/pi/bugs-fail.git', - 'mainrepo' => '/home/pi/bugs-main.git', - 'address' => 'bugs@public-inbox.org', - 'description' => 'development discussion' + is_deeply($cfg->lookup('meta@public-inbox.org'), { + 'mainrepo' => '/home/pi/meta-main.git', + 'address' => 'meta@public-inbox.org', + -primary_address => 'meta@public-inbox.org', + 'listname' => 'meta', }, "lookup matches expected output"); is($cfg->lookup('blah@example.com'), undef, "non-existent lookup returns undef"); + + my $test = $cfg->lookup('test@public-inbox.org'); + is_deeply($test, { + 'address' => ['try@public-inbox.org', + 'sandbox@public-inbox.org', + 'test@public-inbox.org'], + -primary_address => 'try@public-inbox.org', + 'mainrepo' => '/home/pi/test-main.git', + 'listname' => 'test', + }, "lookup matches expected output for test"); } done_testing();