File: test_mark_move_vert.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 (18 lines) | stat: -rw-r--r-- 429 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 = "hi\nworld";

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

    mark_move_vert(cur, 1);
    ASSERT("oob", buf->first_line->next, cur->bline);

    mark_move_vert(cur, 0);
    ASSERT("noop", buf->first_line->next, cur->bline);

    mark_move_vert(cur, -1);
    ASSERT("noop", buf->first_line, cur->bline);
    ASSERT("col", 2, cur->col);
    ASSERT("tcol", 5, cur->target_col);
}