Skip to content

Commit 58d5bb1

Browse files
committed
test: detect git_cherrypick creates a 'cherrypick' group
1 parent 360629a commit 58d5bb1

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

test/docurium_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def teardown
4040
def test_can_parse_headers
4141
keys = @data.keys.map { |k| k.to_s }.sort
4242
assert_equal ['callbacks', 'files', 'functions', 'globals', 'groups', 'prefix', 'types'], keys
43-
assert_equal 154, @data[:functions].size
43+
assert_equal 155, @data[:functions].size
4444
end
4545

4646
def test_can_extract_enum_from_define
@@ -175,8 +175,8 @@ def test_can_get_the_full_description_from_multi_liners
175175
end
176176

177177
def test_can_group_functions
178-
groups = %w(blob commit index lasterror object odb oid reference repository revwalk signature strerror tag tree treebuilder work)
179-
assert_equal groups, @data[:groups].map {|g| g[0]}
178+
groups = %w(blob cherrypick commit index lasterror object odb oid reference repository revwalk signature strerror tag tree treebuilder work)
179+
assert_equal groups, @data[:groups].map {|g| g[0]}.sort
180180
group, funcs = @data[:groups].first
181181
assert_equal 'blob', group
182182
assert_equal 6, funcs.size

test/fixtures/git2/cherrypick.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#ifndef INCLUDE_git_blob_h__
2+
#define INCLUDE_git_blob_h__
3+
4+
#include "common.h"
5+
#include "types.h"
6+
7+
GIT_BEGIN_DECL
8+
9+
/**
10+
* Perform a cherry-pick
11+
*
12+
* @param input dummy input
13+
* @returns the usual
14+
*/
15+
GIT_EXTERN(int) git_cherrypick(char *input);
16+
17+
GIT_END_DECL

0 commit comments

Comments
 (0)