Eric Wong <[email protected]> wrote:
> diff --git a/t/config.t b/t/config.t
> index 8a27a920..d567abd9 100644
> @@ -226,18 +230,16 @@ for my $s (@valid) {
> }
>
> {
> - my $pfx1 = "publicinbox.test1";
> - my $pfx2 = "publicinbox.test2";
> - my $str = <<EOF;
> -$pfx1.address=test\@example.com
> -$pfx1.inboxdir=/path/to/non/existent
> -$pfx2.address=foo\@example.com
> -$pfx2.inboxdir=/path/to/foo
> -$pfx1.coderepo=project
> -$pfx2.coderepo=project
> -coderepo.project.dir=/path/to/project.git
Oops, I forgot to translate the coderepo.project.dir line :x
> + my $cfg = cfg_new $tmpdir, <<EOF;
> +[publicinbox "test1"]
> + address = test\@example.com
> + inboxdir = /path/to/non/existent
> + coderepo = project
> +[publicinbox "test2"]
> + address = foo\@example.com
> + inboxdir = /path/to/foo
> + coderepo = project
> EOF
> - my $cfg = PublicInbox::Config->new(\$str);
> my $t1 = $cfg->lookup_name('test1');
> my $t2 = $cfg->lookup_name('test2');
> is($cfg->repo_objs($t1)->[0], $cfg->repo_objs($t2)->[0],
-----8<----
Subject: [SQUASH] t/config: fix missing coderepo.<PROJECT>.dir entry
Also added an extra check to ensure the coderepo's parsed
properly.
---
t/config.t | 3 +++
1 file changed, 3 insertions(+)
diff --git a/t/config.t b/t/config.t
index d567abd9..9b6684b7 100644
--- a/t/config.t
+++ b/t/config.t
@@ -239,9 +239,12 @@ for my $s (@valid) {
address = foo\@example.com
inboxdir = /path/to/foo
coderepo = project
+[coderepo "project"]
+ dir = /path/to/project.git
EOF
my $t1 = $cfg->lookup_name('test1');
my $t2 = $cfg->lookup_name('test2');
+ ok $cfg->repo_objs($t1)->[0], 'coderepo parsed';
is($cfg->repo_objs($t1)->[0], $cfg->repo_objs($t2)->[0],
'inboxes share ::Git object');
}