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
a8375f53
Commit
a8375f53
authored
Mar 05, 2011
by
nulltoken
Committed by
Vicent Marti
Mar 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test exercising the opening of an standard repository initialized by git
parent
2ce44b67
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
tests/t12-repo.c
+19
-0
No files found.
tests/t12-repo.c
View file @
a8375f53
...
@@ -199,6 +199,24 @@ BEGIN_TEST(open0, "Open a bare repository that has just been initialized by git"
...
@@ -199,6 +199,24 @@ BEGIN_TEST(open0, "Open a bare repository that has just been initialized by git"
must_pass
(
rmdir_recurs
(
TEMP_REPO_FOLDER
));
must_pass
(
rmdir_recurs
(
TEMP_REPO_FOLDER
));
END_TEST
END_TEST
#define SOURCE_EMPTY_REPOSITORY_NAME "empty_standard_repo/.gitted"
#define EMPTY_REPOSITORY_NAME "empty_standard_repo/.git"
#define EMPTY_REPOSITORY_FOLDER TEST_RESOURCES "/" SOURCE_EMPTY_REPOSITORY_NAME "/"
#define DEST_REPOSITORY_FOLDER TEMP_REPO_FOLDER DOT_GIT "/"
BEGIN_TEST
(
open1
,
"Open a standard repository that has just been initialized by git"
)
git_repository
*
repo
;
must_pass
(
copydir_recurs
(
EMPTY_REPOSITORY_FOLDER
,
DEST_REPOSITORY_FOLDER
));
must_pass
(
remove_placeholders
(
DEST_REPOSITORY_FOLDER
,
"dummy-marker.txt"
));
must_pass
(
git_repository_open
(
&
repo
,
DEST_REPOSITORY_FOLDER
));
git_repository_free
(
repo
);
must_pass
(
rmdir_recurs
(
TEMP_REPO_FOLDER
));
END_TEST
BEGIN_TEST
(
open2
,
"Open a bare repository with a relative path escaping out of the current working directory"
)
BEGIN_TEST
(
open2
,
"Open a bare repository with a relative path escaping out of the current working directory"
)
char
new_current_workdir
[
GIT_PATH_MAX
];
char
new_current_workdir
[
GIT_PATH_MAX
];
char
current_workdir
[
GIT_PATH_MAX
];
char
current_workdir
[
GIT_PATH_MAX
];
...
@@ -233,6 +251,7 @@ BEGIN_SUITE(repository)
...
@@ -233,6 +251,7 @@ BEGIN_SUITE(repository)
ADD_TEST
(
init1
);
ADD_TEST
(
init1
);
ADD_TEST
(
init2
);
ADD_TEST
(
init2
);
ADD_TEST
(
open0
);
ADD_TEST
(
open0
);
ADD_TEST
(
open1
);
ADD_TEST
(
open2
);
ADD_TEST
(
open2
);
END_SUITE
END_SUITE
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