Commit 63e5b5512226cfbea24bcf5d74b68cbc89197447

Linquize 2015-07-29T00:08:37

index: add test for adding an old-style submodule to index

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/tests/index/bypath.c b/tests/index/bypath.c
index ddb766a..b587a9c 100644
--- a/tests/index/bypath.c
+++ b/tests/index/bypath.c
@@ -33,3 +33,10 @@ void test_index_bypath__add_submodule(void)
 	cl_git_pass(git_submodule_status(&status, g_repo, sm_name, 0));
 	cl_assert_equal_i(0, status & GIT_SUBMODULE_STATUS_WD_MODIFIED);
 }
+
+void test_index_bypath__add_submodule_old_style(void)
+{
+	const char *sm_name = "not-submodule";
+
+	cl_git_pass(git_index_add_bypath(g_idx, sm_name));
+}