File: test_buffer_add_mark.c

package info (click to toggle)
mle 1.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,108 kB
  • sloc: ansic: 13,335; sh: 728; php: 228; makefile: 83
file content (16 lines) | stat: -rw-r--r-- 432 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "test.h"

char *str = "hello\nworld";

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

    mark = buffer_add_mark(buf, NULL, 0);
    ASSERT("mark0bline", 1, mark->bline == buf->first_line ? 1 : 0);
    ASSERT("mark0col", 0, mark->col);

    mark = buffer_add_mark(buf, buf->first_line->next, 5);
    ASSERT("mark1bline", 1, mark->bline == buf->first_line->next ? 1 : 0);
    ASSERT("mark1col", 5, mark->col);
}