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
f3f4c6b5
Commit
f3f4c6b5
authored
Jun 24, 2013
by
Russell Belfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix checkout tests on Windows
parent
353a90be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
tests-clar/checkout/index.c
+8
-3
tests-clar/checkout/tree.c
+6
-3
No files found.
tests-clar/checkout/index.c
View file @
f3f4c6b5
...
@@ -26,6 +26,10 @@ void test_checkout_index__initialize(void)
...
@@ -26,6 +26,10 @@ void test_checkout_index__initialize(void)
void
test_checkout_index__cleanup
(
void
)
void
test_checkout_index__cleanup
(
void
)
{
{
cl_git_sandbox_cleanup
();
cl_git_sandbox_cleanup
();
/* try to remove alternative dir */
if
(
git_path_isdir
(
"alternative"
))
git_futils_rmdir_r
(
"alternative"
,
NULL
,
GIT_RMDIR_REMOVE_FILES
);
}
}
void
test_checkout_index__cannot_checkout_a_bare_repository
(
void
)
void
test_checkout_index__cannot_checkout_a_bare_repository
(
void
)
...
@@ -576,9 +580,10 @@ void test_checkout_index__target_directory_from_bare(void)
...
@@ -576,9 +580,10 @@ void test_checkout_index__target_directory_from_bare(void)
cl_assert_equal_i
(
0
,
cts
.
n_ignored
);
cl_assert_equal_i
(
0
,
cts
.
n_ignored
);
cl_assert_equal_i
(
3
,
cts
.
n_updates
);
cl_assert_equal_i
(
3
,
cts
.
n_updates
);
check_file_contents
(
"./alternative/README"
,
"hey there
\n
"
);
/* files will have been filtered if needed, so strip CR */
check_file_contents
(
"./alternative/branch_file.txt"
,
"hi
\n
bye!
\n
"
);
check_file_contents_nocr
(
"./alternative/README"
,
"hey there
\n
"
);
check_file_contents
(
"./alternative/new.txt"
,
"my new file
\n
"
);
check_file_contents_nocr
(
"./alternative/branch_file.txt"
,
"hi
\n
bye!
\n
"
);
check_file_contents_nocr
(
"./alternative/new.txt"
,
"my new file
\n
"
);
cl_git_pass
(
git_futils_rmdir_r
(
cl_git_pass
(
git_futils_rmdir_r
(
"alternative"
,
NULL
,
GIT_RMDIR_REMOVE_FILES
));
"alternative"
,
NULL
,
GIT_RMDIR_REMOVE_FILES
));
...
...
tests-clar/checkout/tree.c
View file @
f3f4c6b5
...
@@ -24,6 +24,9 @@ void test_checkout_tree__cleanup(void)
...
@@ -24,6 +24,9 @@ void test_checkout_tree__cleanup(void)
g_object
=
NULL
;
g_object
=
NULL
;
cl_git_sandbox_cleanup
();
cl_git_sandbox_cleanup
();
if
(
git_path_isdir
(
"alternative"
))
git_futils_rmdir_r
(
"alternative"
,
NULL
,
GIT_RMDIR_REMOVE_FILES
);
}
}
void
test_checkout_tree__cannot_checkout_a_non_treeish
(
void
)
void
test_checkout_tree__cannot_checkout_a_non_treeish
(
void
)
...
@@ -667,9 +670,9 @@ void test_checkout_tree__target_directory_from_bare(void)
...
@@ -667,9 +670,9 @@ void test_checkout_tree__target_directory_from_bare(void)
cl_assert_equal_i
(
0
,
cts
.
n_ignored
);
cl_assert_equal_i
(
0
,
cts
.
n_ignored
);
cl_assert_equal_i
(
3
,
cts
.
n_updates
);
cl_assert_equal_i
(
3
,
cts
.
n_updates
);
check_file_contents
(
"./alternative/README"
,
"hey there
\n
"
);
check_file_contents
_nocr
(
"./alternative/README"
,
"hey there
\n
"
);
check_file_contents
(
"./alternative/branch_file.txt"
,
"hi
\n
bye!
\n
"
);
check_file_contents
_nocr
(
"./alternative/branch_file.txt"
,
"hi
\n
bye!
\n
"
);
check_file_contents
(
"./alternative/new.txt"
,
"my new file
\n
"
);
check_file_contents
_nocr
(
"./alternative/new.txt"
,
"my new file
\n
"
);
cl_git_pass
(
git_futils_rmdir_r
(
cl_git_pass
(
git_futils_rmdir_r
(
"alternative"
,
NULL
,
GIT_RMDIR_REMOVE_FILES
));
"alternative"
,
NULL
,
GIT_RMDIR_REMOVE_FILES
));
...
...
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