File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -269,3 +269,26 @@ void test_submodule_lookup__just_added(void)
269
269
refute_submodule_exists (g_repo , "sm_just_added_head" , GIT_EEXISTS );
270
270
}
271
271
272
+ /* Test_App and Test_App2 are fairly similar names, make sure we load the right one */
273
+ void test_submodule_lookup__prefix_name (void )
274
+ {
275
+ git_submodule * sm ;
276
+
277
+ cl_git_rewritefile ("submod2/.gitmodules" ,
278
+ "[submodule \"Test_App\"]\n"
279
+ " path = Test_App\n"
280
+ " url = ../Test_App\n"
281
+ "[submodule \"Test_App2\"]\n"
282
+ " path = Test_App2\n"
283
+ " url = ../Test_App\n" );
284
+
285
+ cl_git_pass (git_submodule_lookup (& sm , g_repo , "Test_App" ));
286
+ cl_assert_equal_s ("Test_App" , git_submodule_name (sm ));
287
+
288
+ git_submodule_free (sm );
289
+
290
+ cl_git_pass (git_submodule_lookup (& sm , g_repo , "Test_App2" ));
291
+ cl_assert_equal_s ("Test_App2" , git_submodule_name (sm ));
292
+
293
+ git_submodule_free (sm );
294
+ }
You can’t perform that action at this time.
0 commit comments