2 # Copyright (C) 2020 all contributors <meta@public-inbox.org>
3 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
6 use PublicInbox::TestCommon;
7 use PublicInbox::Config; # this relies on PI_CONFIG // ~/.public-inbox/config
9 my @psgi = qw(HTTP::Request::Common Plack::Test URI::Escape Plack::Builder);
10 require_mods(qw(DBD::SQLite Search::Xapian), @psgi);
12 my $cfg = PublicInbox::Config->new;
13 my $www = PublicInbox::WWW->new($cfg);
16 $env->{'psgi.errors'} = \*STDERR;
20 # TODO: convert these to self-contained test cases
23 'eebf7a8/s/?b=t%2Ftest-lib.sh',
24 'eb580ca513/s/?b=remote-odb.c',
25 '776fa90f7f/s/?b=contrib/git-jump/git-jump',
26 '5cd8845/s/?b=submodule.c',
27 '81c1164ae5/s/?b=builtin/log.c',
28 '6aa8857a11/s/?b=protocol.c', # TODO: i/, w/ instead of a/ b/
29 '96f1c7f/s/', # TODO: b=contrib/completion/git-completion.bash
30 'b76f2c0/s/?b=po/zh_CN.po',
39 my $res = $cb->(GET($url));
40 is($res->code, 200, $url);
41 next if $res->code == 200;
47 while (($ibx, $urls) = each %$todo) {
49 if (!$cfg->lookup_name($ibx)) {
50 skip("$ibx not configured", scalar(@$urls));
52 test_psgi($app, $client);