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
d005885f
Commit
d005885f
authored
Sep 24, 2013
by
Russell Belfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up filebuf tests a bit
parent
634f10f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
tests-clar/core/filebuf.c
+5
-5
No files found.
tests-clar/core/filebuf.c
View file @
d005885f
...
...
@@ -24,18 +24,16 @@ void test_core_filebuf__0(void)
void
test_core_filebuf__1
(
void
)
{
git_filebuf
file
=
GIT_FILEBUF_INIT
;
int
fd
;
char
test
[]
=
"test"
;
fd
=
p_creat
(
test
,
0666
);
//-V536
cl_must_pass
(
fd
);
cl_must_pass
(
p_write
(
fd
,
"libgit2 rocks
\n
"
,
14
));
cl_must_pass
(
p_close
(
fd
));
cl_git_mkfile
(
test
,
"libgit2 rocks
\n
"
);
cl_git_pass
(
git_filebuf_open
(
&
file
,
test
,
GIT_FILEBUF_APPEND
));
cl_git_pass
(
git_filebuf_printf
(
&
file
,
"%s
\n
"
,
"libgit2 rocks"
));
cl_git_pass
(
git_filebuf_commit
(
&
file
,
0666
));
cl_assert_equal_file
(
"libgit2 rocks
\n
libgit2 rocks
\n
"
,
0
,
test
);
cl_must_pass
(
p_unlink
(
test
));
}
...
...
@@ -53,6 +51,8 @@ void test_core_filebuf__2(void)
cl_git_pass
(
git_filebuf_write
(
&
file
,
buf
,
sizeof
(
buf
)));
cl_git_pass
(
git_filebuf_commit
(
&
file
,
0666
));
cl_assert_equal_file
((
char
*
)
buf
,
sizeof
(
buf
),
test
);
cl_must_pass
(
p_unlink
(
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