File: test_mark_get_offset.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 (15 lines) | stat: -rw-r--r-- 302 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "test.h"

char *str = "hello\nworld";

void test(buffer_t *buf, mark_t *cur) {
    bint_t offset;

    mark_move_end(cur);
    mark_get_offset(cur, &offset);
    ASSERT("offset", 11, offset);

    mark_move_beginning(cur);
    mark_get_offset(cur, &offset);
    ASSERT("offset", 0, offset);
}