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

char *str = "hello\nworld";

void test(buffer_t *buf, mark_t *cur) {
    mark_move_offset(cur, 11);
    ASSERT("col1", 5, cur->col);
    ASSERT("line1", buf->first_line->next, cur->bline);

    mark_move_offset(cur, 6);
    ASSERT("col2", 0, cur->col);
    ASSERT("line2", buf->first_line->next, cur->bline);

    mark_move_offset(cur, 12);
    ASSERT("oobcol", 5, cur->col);
    ASSERT("oobline", buf->first_line->next, cur->bline);
}