Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Marcus Hoffmann
nettle
Commits
8ba37244
Commit
8ba37244
authored
Feb 10, 2003
by
Niels Möller
Browse files
(test_main): New test with tokens
in the format string. Rev: src/nettle/testsuite/sexp-format-test.c:1.5
parent
889b9bc9
Changes
1
Hide whitespace changes
Inline
Side-by-side
testsuite/sexp-format-test.c
View file @
8ba37244
...
...
@@ -73,7 +73,24 @@ test_main(void)
ASSERT
(
MEMEQ
(
buffer
.
size
,
buffer
.
contents
,
e
));
}
/* Try literals */
{
const
uint8_t
e
[]
=
"(3:foo(3:bar17:xxxxxxxxxxxxxxxxx))"
;
nettle_buffer_init
(
&
buffer
);
ASSERT
(
sexp_format
(
&
buffer
,
"(%0s(bar%0s))"
,
"foo"
,
"xxxxxxxxxxxxxxxxx"
)
==
strlen
(
e
));
ASSERT
(
sexp_format
(
NULL
,
"(%0s(%0s%0s))"
,
"foo"
,
"bar"
,
"xxxxxxxxxxxxxxxxx"
)
==
strlen
(
e
));
ASSERT
(
buffer
.
size
==
strlen
(
e
));
ASSERT
(
MEMEQ
(
buffer
.
size
,
buffer
.
contents
,
e
));
}
#if HAVE_LIBGMP
{
mpz_t
x
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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