diff options
author | Eric Wong <e@80x24.org> | 2023-10-17 23:38:07 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-10-18 20:50:37 +0000 |
commit | bd2dff9301db686ed013e4d8cf6319fe0b06e5e5 (patch) | |
tree | 9feb178bf88282fda4259c90eba8978d301a40d7 | |
parent | 3829004faab901fabbda922a1900842e51812ff0 (diff) | |
download | public-inbox-bd2dff9301db686ed013e4d8cf6319fe0b06e5e5.tar.gz |
It's actually valid Perl syntax, but still confusing to look at. Fixes: add90b9504f4 ("support -C (chdir) for most non-daemon commands")
-rwxr-xr-x | script/public-inbox-init | 2 | ||||
-rw-r--r-- | t/init.t | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/script/public-inbox-init b/script/public-inbox-init index 33bee310..b3e94faf 100755 --- a/script/public-inbox-init +++ b/script/public-inbox-init @@ -60,7 +60,7 @@ my $inboxdir = shift @ARGV or $usage_cb->(); my $http_url = shift @ARGV or $usage_cb->(); my (@address) = @ARGV; @address or $usage_cb->(); -+PublicInbox::Admin::do_chdir(\@chdir); +PublicInbox::Admin::do_chdir(\@chdir); @c_extra = map { my ($k, $v) = split(/=/, $_, 2); @@ -216,6 +216,13 @@ SKIP: { is($n, 13, 'V1 NNTP article numbers skipped via --skip-artnum'); } +{ + my $cmd = [ qw(-init -C), "$tmpdir", qw(chdirlist chdirlist), + qw(http://example.com/chdirlist chdirlist@example.com)]; + ok(run_script($cmd), '-init with -C (chdir)'); + ok(-d "$tmpdir/chdirlist", '-C processed correctly'); +} + done_testing(); sub read_indexlevel { |