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
1e758fd3
Unverified
Commit
1e758fd3
authored
Jan 16, 2018
by
Brian Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
just use git_message_trailer in tests
parent
6062032e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
15 deletions
+10
-15
tests/message/trailer.c
+10
-15
No files found.
tests/message/trailer.c
View file @
1e758fd3
#include "clar_libgit2.h"
#include "message.h"
struct
trailer
{
const
char
*
key
;
const
char
*
value
;
};
static
void
assert_trailers
(
const
char
*
message
,
struct
trailer
*
trailers
)
static
void
assert_trailers
(
const
char
*
message
,
git_message_trailer
*
trailers
)
{
git_message_trailer_array
arr
;
size_t
i
;
...
...
@@ -27,7 +22,7 @@ static void assert_trailers(const char *message, struct trailer *trailers)
void
test_message_trailer__simple
(
void
)
{
struct
trailer
trailers
[]
=
{
git_message_
trailer
trailers
[]
=
{
{
"Signed-off-by"
,
"foo@bar.com"
},
{
"Signed-off-by"
,
"someone@else.com"
},
{
NULL
,
NULL
},
...
...
@@ -43,7 +38,7 @@ void test_message_trailer__simple(void)
void
test_message_trailer__no_whitespace
(
void
)
{
struct
trailer
trailers
[]
=
{
git_message_
trailer
trailers
[]
=
{
{
"Key"
,
"value"
},
{
NULL
,
NULL
},
};
...
...
@@ -57,7 +52,7 @@ void test_message_trailer__no_whitespace(void)
void
test_message_trailer__extra_whitespace
(
void
)
{
struct
trailer
trailers
[]
=
{
git_message_
trailer
trailers
[]
=
{
{
"Key"
,
"value"
},
{
NULL
,
NULL
},
};
...
...
@@ -71,7 +66,7 @@ void test_message_trailer__extra_whitespace(void)
void
test_message_trailer__no_newline
(
void
)
{
struct
trailer
trailers
[]
=
{
git_message_
trailer
trailers
[]
=
{
{
"Key"
,
"value"
},
{
NULL
,
NULL
},
};
...
...
@@ -85,7 +80,7 @@ void test_message_trailer__no_newline(void)
void
test_message_trailer__not_last_paragraph
(
void
)
{
struct
trailer
trailers
[]
=
{
git_message_
trailer
trailers
[]
=
{
{
NULL
,
NULL
},
};
...
...
@@ -100,7 +95,7 @@ void test_message_trailer__not_last_paragraph(void)
void
test_message_trailer__conflicts
(
void
)
{
struct
trailer
trailers
[]
=
{
git_message_
trailer
trailers
[]
=
{
{
"Key"
,
"value"
},
{
NULL
,
NULL
},
};
...
...
@@ -117,7 +112,7 @@ void test_message_trailer__conflicts(void)
void
test_message_trailer__patch
(
void
)
{
struct
trailer
trailers
[]
=
{
git_message_
trailer
trailers
[]
=
{
{
"Key"
,
"value"
},
{
NULL
,
NULL
},
};
...
...
@@ -134,7 +129,7 @@ void test_message_trailer__patch(void)
void
test_message_trailer__continuation
(
void
)
{
struct
trailer
trailers
[]
=
{
git_message_
trailer
trailers
[]
=
{
{
"A"
,
"b
\n
c"
},
{
"D"
,
"e
\n
f: g h"
},
{
"I"
,
"j"
},
...
...
@@ -154,7 +149,7 @@ void test_message_trailer__continuation(void)
void
test_message_trailer__invalid
(
void
)
{
struct
trailer
trailers
[]
=
{
git_message_
trailer
trailers
[]
=
{
{
"Signed-off-by"
,
"some@one.com"
},
{
"Another"
,
"trailer"
},
{
NULL
,
NULL
},
...
...
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