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
ccd122fd
Commit
ccd122fd
authored
Jul 22, 2011
by
nulltoken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
discover: Make test run in temporary folder instead of altering the test resources folder
parent
f6867e63
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tests/t12-repo.c
+3
-3
No files found.
tests/t12-repo.c
View file @
ccd122fd
...
...
@@ -309,7 +309,7 @@ BEGIN_TEST(orphan0, "test if HEAD is orphan")
git_repository_free
(
repo
);
END_TEST
#define DISCOVER_FOLDER TE
ST_RESOURCES "/
discover.git"
#define DISCOVER_FOLDER TE
MP_REPO_FOLDER "
discover.git"
#define SUB_REPOSITORY_FOLDER_NAME "sub_repo"
#define SUB_REPOSITORY_FOLDER DISCOVER_FOLDER "/" SUB_REPOSITORY_FOLDER_NAME
...
...
@@ -388,7 +388,7 @@ BEGIN_TEST(discover0, "test discover")
char
found_path
[
GIT_PATH_MAX
];
int
mode
=
0755
;
must_pass
(
append_ceiling_dir
(
ceiling_dirs
,
TEST_RESOURCES
));
must_pass
(
append_ceiling_dir
(
ceiling_dirs
,
TEMP_REPO_FOLDER
));
git_futils_mkdir_r
(
DISCOVER_FOLDER
,
mode
);
must_be_true
(
git_repository_discover
(
repository_path
,
sizeof
(
repository_path
),
DISCOVER_FOLDER
,
0
,
ceiling_dirs
)
==
GIT_ENOTAREPO
);
...
...
@@ -442,7 +442,7 @@ BEGIN_TEST(discover0, "test discover")
must_pass
(
ensure_repository_discover
(
REPOSITORY_ALTERNATE_FOLDER_SUB_SUB
,
ceiling_dirs
,
sub_repository_path
));
must_pass
(
ensure_repository_discover
(
REPOSITORY_ALTERNATE_FOLDER_SUB_SUB_SUB
,
ceiling_dirs
,
repository_path
));
must_pass
(
git_futils_rmdir_r
(
DISCOVER
_FOLDER
,
1
));
must_pass
(
git_futils_rmdir_r
(
TEMP_REPO
_FOLDER
,
1
));
git_repository_free
(
repo
);
END_TEST
...
...
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