Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
27730eef
Commit
27730eef
authored
Sep 05, 2012
by
Russell Belfer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #917 from arrbee/test-issue-835
Test for gitmodules only submodule def
parents
4d383403
fed886d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletions
+8
-1
tests-clar/resources/submod2/gitmodules
+3
-0
tests-clar/submodule/lookup.c
+5
-1
No files found.
tests-clar/resources/submod2/gitmodules
View file @
27730eef
...
...
@@ -19,3 +19,6 @@
[submodule "sm_added_and_uncommited"]
path = sm_added_and_uncommited
url = ../submod2_target
[submodule "sm_gitmodules_only"]
path = sm_gitmodules_only
url = ../submod2_target
tests-clar/submodule/lookup.c
View file @
27730eef
...
...
@@ -34,6 +34,10 @@ void test_submodule_lookup__simple_lookup(void)
cl_git_pass
(
git_submodule_lookup
(
&
sm
,
g_repo
,
"sm_added_and_uncommited"
));
cl_assert
(
sm
);
/* lookup pending change in .gitmodules that is neither in HEAD nor index */
cl_git_pass
(
git_submodule_lookup
(
&
sm
,
g_repo
,
"sm_gitmodules_only"
));
cl_assert
(
sm
);
/* lookup git repo subdir that is not added as submodule */
cl_assert
(
git_submodule_lookup
(
&
sm
,
g_repo
,
"not_submodule"
)
==
GIT_EEXISTS
);
...
...
@@ -106,5 +110,5 @@ void test_submodule_lookup__foreach(void)
sm_lookup_data
data
;
memset
(
&
data
,
0
,
sizeof
(
data
));
cl_git_pass
(
git_submodule_foreach
(
g_repo
,
sm_lookup_cb
,
&
data
));
cl_assert_equal_i
(
7
,
data
.
count
);
cl_assert_equal_i
(
8
,
data
.
count
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment