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
3d78ab64
Commit
3d78ab64
authored
Jul 06, 2012
by
nulltoken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revparse: split reflog test per feature
parent
3cd90893
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
tests-clar/refs/revparse.c
+18
-8
No files found.
tests-clar/refs/revparse.c
View file @
3d78ab64
...
...
@@ -149,22 +149,32 @@ void test_refs_revparse__upstream(void)
test_object
(
"refs/heads/master@{u}"
,
"be3563ae3f795b2b4353bcce3a527ad0a4f7f644"
);
}
void
test_refs_revparse__
reflog
(
void
)
void
test_refs_revparse__
ordinal
(
void
)
{
cl_git_fail
(
git_revparse_single
(
&
g_obj
,
g_repo
,
"@{-xyz}"
));
cl_git_fail
(
git_revparse_single
(
&
g_obj
,
g_repo
,
"@{-0}"
));
cl_git_fail
(
git_revparse_single
(
&
g_obj
,
g_repo
,
"master@{-2}"
));
cl_git_fail
(
git_revparse_single
(
&
g_obj
,
g_repo
,
"@{1000}"
));
test_object
(
"nope@{0}"
,
NULL
);
test_object
(
"master@{31415}"
,
NULL
);
test_object
(
"@{1000}"
,
NULL
);
test_object
(
"@{-2}"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
test_object
(
"@{-1}"
,
"a4a7dce85cf63874e984719f4fdd239f5145052f"
);
test_object
(
"master@{0}"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
test_object
(
"master@{1}"
,
"be3563ae3f795b2b4353bcce3a527ad0a4f7f644"
);
test_object
(
"@{0}"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
test_object
(
"@{1}"
,
"be3563ae3f795b2b4353bcce3a527ad0a4f7f644"
);
test_object
(
"master@{0}"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
test_object
(
"master@{1}"
,
"be3563ae3f795b2b4353bcce3a527ad0a4f7f644"
);
test_object
(
"heads/master@{1}"
,
"be3563ae3f795b2b4353bcce3a527ad0a4f7f644"
);
test_object
(
"refs/heads/master@{1}"
,
"be3563ae3f795b2b4353bcce3a527ad0a4f7f644"
);
}
void
test_refs_revparse__previous_head
(
void
)
{
cl_git_fail
(
git_revparse_single
(
&
g_obj
,
g_repo
,
"@{-xyz}"
));
cl_git_fail
(
git_revparse_single
(
&
g_obj
,
g_repo
,
"@{-0}"
));
test_object
(
"@{-42}"
,
NULL
);
test_object
(
"@{-2}"
,
"a65fedf39aefe402d3bb6e24df4d4f5fe4547750"
);
test_object
(
"@{-1}"
,
"a4a7dce85cf63874e984719f4fdd239f5145052f"
);
}
static
void
create_fake_stash_reference_and_reflog
(
git_repository
*
repo
)
...
...
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