Commit d117f32b authored by Niels Möller's avatar Niels Möller

(test_main): Test space-searated literals too.

Rev: src/nettle/testsuite/sexp-format-test.c:1.6
parent 59d46da3
......@@ -83,8 +83,23 @@ test_main(void)
"foo", "xxxxxxxxxxxxxxxxx")
== strlen(e));
ASSERT(sexp_format(NULL, "(%0s(%0s%0s))",
"foo", "bar", "xxxxxxxxxxxxxxxxx")
ASSERT(sexp_format(NULL, "(%0s(bar %0s))",
"foo", "xxxxxxxxxxxxxxxxx")
== strlen(e));
ASSERT(buffer.size == strlen(e));
ASSERT(MEMEQ(buffer.size, buffer.contents, e));
}
{
const uint8_t e[] = "(3:foo(3:bar17:xxxxxxxxxxxxxxxxx))";
nettle_buffer_init(&buffer);
ASSERT(sexp_format(&buffer, "(%0s(bar xxxxxxxxxxxxxxxxx))",
"foo")
== strlen(e));
ASSERT(sexp_format(NULL, "(%0s(bar xxxxxxxxxxxxxxxxx))",
"foo")
== strlen(e));
ASSERT(buffer.size == strlen(e));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment