@@ -31,15 +31,6 @@ check_basename(const char *A, const char *B)
3131 git__free (base2 );
3232}
3333
34- static void
35- check_topdir (const char * A , const char * B )
36- {
37- const char * dir ;
38-
39- cl_assert ((dir = git_path_topdir (A )) != NULL );
40- cl_assert_equal_s (B , dir );
41- }
42-
4334static void
4435check_joinpath (const char * path_a , const char * path_b , const char * expected_path )
4536{
@@ -119,23 +110,6 @@ void test_core_path__01_basename(void)
119110 check_basename (REP1024 ("/abc" ), "abc" );
120111}
121112
122- /* get the latest component in a path */
123- void test_core_path__02_topdir (void )
124- {
125- check_topdir (".git/" , ".git/" );
126- check_topdir ("/.git/" , ".git/" );
127- check_topdir ("usr/local/.git/" , ".git/" );
128- check_topdir ("./.git/" , ".git/" );
129- check_topdir ("/usr/.git/" , ".git/" );
130- check_topdir ("/" , "/" );
131- check_topdir ("a/" , "a/" );
132-
133- cl_assert (git_path_topdir ("/usr/.git" ) == NULL );
134- cl_assert (git_path_topdir ("." ) == NULL );
135- cl_assert (git_path_topdir ("" ) == NULL );
136- cl_assert (git_path_topdir ("a" ) == NULL );
137- }
138-
139113/* properly join path components */
140114void test_core_path__05_joins (void )
141115{
@@ -285,7 +259,7 @@ void test_core_path__08_self_join(void)
285259 cl_git_pass (git_buf_joinpath (& path , path .ptr + 4 , "somethinglongenoughtorealloc" ));
286260 cl_assert_equal_s (path .ptr , "/baz/somethinglongenoughtorealloc" );
287261 cl_assert (asize < path .asize );
288-
262+
289263 git_buf_dispose (& path );
290264}
291265
0 commit comments