File: test_buffer_get.c

package info (click to toggle)
mle 1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,508 kB
  • sloc: ansic: 9,582; sh: 383; php: 228; makefile: 82
file content (12 lines) | stat: -rw-r--r-- 263 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
#include "test.h"

char *str = "hello\nworld";

void test(buffer_t *buf, mark_t *cur) {
    char *data;
    bint_t data_len;

    buffer_get(buf, &data, &data_len);
    ASSERT("len", 11, data_len);
    ASSERT("get", 0, strncmp(data, "hello\nworld", data_len));
}