repo.or.cz
/
git
/
dscho.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge clone
[git/dscho.git]
/
test-strbuf.c
blob
479fa08f203ca0919fedae8e79ff993bff527db7
1
#include
"cache.h"
2
#include
"strbuf.h"
3
4
int
main
(
int
argc
,
char
**
argv
)
5
{
6
struct
strbuf buf
;
7
#define TEST_FORMAT \
8
"'%%%.*s,%x,%05X,%u,%i,% 4d,%3d,%c,%3d'"
, \
9
5,
"Hello, World!"
, 27, 27, -1, -1, 1, 5,
':'
, 1234
10
11
strbuf_initf
(&
buf
,
TEST_FORMAT
);
12
printf
(
"result=%s
\n
"
,
buf
.
buf
);
13
printf
(
"expect="
TEST_FORMAT
);
14
strbuf_release
(&
buf
);
15
16
return
0
;
17
}