mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-31 13:00:49 +00:00
fixes for C89
This commit is contained in:
1 parent
776360ca93
commit
ad58a48144
6 files changed
+35
-43
No files matched your search
@@ -2265,6 +2265,15 @@ static void test_str(void) {
|
||||
ASSERT(sn("%s ", "a"));
|
||||
ASSERT(sn("%s %s", "a", "b"));
|
||||
ASSERT(sn("%2s %s", "a", "b"));
|
||||
{ // mg_queue_printf()
|
||||
struct mg_queue q;
|
||||
char buf[128];
|
||||
mg_queue_init(&q, buf, sizeof(buf));
|
||||
void *p = (void *) 0xffffffffffffffff;
|
||||
size_t len = mg_queue_printf(&q, "A%p%p%pB", p, p, p);
|
||||
ASSERT(len == 56);
|
||||
ASSERT(memcmp(buf + 4, "A0xffffffffffffffff0xffffffffffffffff0xffffffffffffffffB", 56) == 0);
|
||||
}
|
||||
|
||||
// Non-standard formatting
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user