summaryrefslogtreecommitdiff
path: root/tests/submodule
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-03-31 17:33:44 -0400
committerEdward Thomson <ethomson@github.com>2016-03-31 17:58:43 -0400
commit74ab5f2cd010ffb824735402ebcd76895a975b4d (patch)
tree79410e235c84ba10e316928453f9eb4dd87eec86 /tests/submodule
parent1694a63994e58ea0f479cfab318d99c7cb9bbeba (diff)
downloadlibgit2-74ab5f2cd010ffb824735402ebcd76895a975b4d.tar.gz
status: test submodules with mixed case
Diffstat (limited to 'tests/submodule')
-rw-r--r--tests/submodule/submodule_helpers.c26
-rw-r--r--tests/submodule/submodule_helpers.h1
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/submodule/submodule_helpers.c b/tests/submodule/submodule_helpers.c
index 4ff4b4da7..6c2b9cf78 100644
--- a/tests/submodule/submodule_helpers.c
+++ b/tests/submodule/submodule_helpers.c
@@ -126,6 +126,32 @@ git_repository *setup_fixture_submod2(void)
return repo;
}
+git_repository *setup_fixture_submod3(void)
+{
+ git_repository *repo = cl_git_sandbox_init("submod3");
+
+ cl_fixture_sandbox("submod2_target");
+ p_rename("submod2_target/.gitted", "submod2_target/.git");
+
+ rewrite_gitmodules(git_repository_workdir(repo));
+ p_rename("submod3/One/.gitted", "submod3/One/.git");
+ p_rename("submod3/TWO/.gitted", "submod3/TWO/.git");
+ p_rename("submod3/three/.gitted", "submod3/three/.git");
+ p_rename("submod3/FoUr/.gitted", "submod3/FoUr/.git");
+ p_rename("submod3/Five/.gitted", "submod3/Five/.git");
+ p_rename("submod3/six/.gitted", "submod3/six/.git");
+ p_rename("submod3/sEvEn/.gitted", "submod3/sEvEn/.git");
+ p_rename("submod3/EIGHT/.gitted", "submod3/EIGHT/.git");
+ p_rename("submod3/nine/.gitted", "submod3/nine/.git");
+ p_rename("submod3/TEN/.gitted", "submod3/TEN/.git");
+
+ cl_set_cleanup(cleanup_fixture_submodules, "submod2_target");
+
+ cl_git_pass(git_repository_reinit_filesystem(repo, 1));
+
+ return repo;
+}
+
git_repository *setup_fixture_super(void)
{
git_repository *repo = cl_git_sandbox_init("super");
diff --git a/tests/submodule/submodule_helpers.h b/tests/submodule/submodule_helpers.h
index 42b14a7bc..d112b0c77 100644
--- a/tests/submodule/submodule_helpers.h
+++ b/tests/submodule/submodule_helpers.h
@@ -3,6 +3,7 @@ extern void rewrite_gitmodules(const char *workdir);
/* these will automatically set a cleanup callback */
extern git_repository *setup_fixture_submodules(void);
extern git_repository *setup_fixture_submod2(void);
+extern git_repository *setup_fixture_submod3(void);
extern git_repository *setup_fixture_submodule_simple(void);
extern git_repository *setup_fixture_super(void);
extern git_repository *setup_fixture_submodule_with_path(void);