diff options
author | Eric Wong <e@80x24.org> | 2019-12-25 07:51:03 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-12-28 19:38:10 +0000 |
commit | b316f7541ec263fd04ea50530a1d500f43773299 (patch) | |
tree | d78a59ef1cd86a61481b91dba3020b41e8365688 /t | |
parent | bc23e3dc4b252dc7e9b6f3824afe74d85456b689 (diff) | |
download | public-inbox-b316f7541ec263fd04ea50530a1d500f43773299.tar.gz |
This allows us to get rid of the requirement to capture on-stack variables with an anonymous sub, as illustrated with the update to viewvcs to take advantage of this. v2: fix error handling for missing OIDs
Diffstat (limited to 't')
-rw-r--r-- | t/solver_git.t | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/t/solver_git.t b/t/solver_git.t index af5bf7bc..0c272d77 100644 --- a/t/solver_git.t +++ b/t/solver_git.t @@ -157,6 +157,7 @@ EOF close $cfgfh or die; my $cfg = PublicInbox::Config->new($cfgpath); my $www = PublicInbox::WWW->new($cfg); + my $non_existent = 'ee5e32211bf62ab6531bdf39b84b6920d0b6775a'; my $client = sub { my ($cb) = @_; my $res = $cb->(GET("/$name/3435775/s/")); @@ -165,6 +166,9 @@ EOF $res = $cb->(GET("/$name/".('0'x40).'/s/')); is($res->code, 404, 'failure with null OID'); + $res = $cb->(GET("/$name/$non_existent/s/")); + is($res->code, 404, 'failure with null OID'); + $res = $cb->(GET("/$name/$v1_0_0_tag/s/")); is($res->code, 200, 'shows commit'); while (my ($label, $size) = each %bin) { |