about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-02-17 05:09:50 +0000
committerEric Wong <e@80x24.org>2019-04-04 09:13:57 +0000
commitc9890ef809425a3607c2f1108eb19c30aa0f077b (patch)
treec471917fee0160e906a90d68483abda631afccaf /t
parent2537d9dd897a87f4149fe5dccfd11f6d1f1e2d8e (diff)
downloadpublic-inbox-c9890ef809425a3607c2f1108eb19c30aa0f077b.tar.gz
This will be useful for extracting titles/subjects from
commit objects when displaying commits.
Diffstat (limited to 't')
-rw-r--r--t/solver_git.t9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/solver_git.t b/t/solver_git.t
index 8de63988..6f0ce777 100644
--- a/t/solver_git.t
+++ b/t/solver_git.t
@@ -40,7 +40,14 @@ sub deliver_patch ($) {
 
 deliver_patch('t/solve/0001-simple-mod.patch');
 
-$ibx->{-repo_objs} = [ PublicInbox::Git->new($git_dir) ];
+my $git = PublicInbox::Git->new($git_dir);
+is('public-inbox 1.0.0',
+        $git->commit_title('cb7c42b1e15577ed2215356a2bf925aef59cdd8d'),
+        'commit_title works on 1.0.0');
+
+is(undef, $git->commit_title('impossible'), 'undef on impossible object');
+
+$ibx->{-repo_objs} = [ $git ];
 my $res;
 my $solver = PublicInbox::SolverGit->new($ibx, sub { $res = $_[0] });
 open my $log, '+>>', "$mainrepo/solve.log" or die "open: $!";