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
7456e819
Commit
7456e819
authored
Jul 11, 2022
by
yuangli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: error when create tag with invalid name
parent
fe9bfec4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
tests/object/tag/write.c
+16
-0
No files found.
tests/object/tag/write.c
View file @
7456e819
...
@@ -258,3 +258,19 @@ void test_object_tag_write__creating_an_annotation_does_not_create_a_reference(v
...
@@ -258,3 +258,19 @@ void test_object_tag_write__creating_an_annotation_does_not_create_a_reference(v
create_annotation
(
&
tag_id
,
"new_tag"
);
create_annotation
(
&
tag_id
,
"new_tag"
);
cl_git_fail_with
(
git_reference_lookup
(
&
tag_ref
,
g_repo
,
"refs/tags/new_tag"
),
GIT_ENOTFOUND
);
cl_git_fail_with
(
git_reference_lookup
(
&
tag_ref
,
g_repo
,
"refs/tags/new_tag"
),
GIT_ENOTFOUND
);
}
}
void
test_object_tag_write__error_when_create_tag_with_invalid_name
(
void
)
{
git_oid
target_id
,
tag_id
;
git_signature
*
tagger
;
git_object
*
target
;
git_oid_fromstr
(
&
target_id
,
tagged_commit
);
cl_git_pass
(
git_object_lookup
(
&
target
,
g_repo
,
&
target_id
,
GIT_OBJECT_COMMIT
));
cl_git_pass
(
git_signature_new
(
&
tagger
,
tagger_name
,
tagger_email
,
123456789
,
60
));
cl_git_fail
(
git_tag_create
(
&
tag_id
,
g_repo
,
"-dash"
,
target
,
tagger
,
tagger_message
,
0
)
);
}
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