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

char *str = "0\n1\n2\n3\n4\n";

void test(buffer_t *buf, mark_t *cur) {
    bint_t i;
    bline_t *line;
    bline_t *line2;
    for (line = buf->first_line, i = 0; line; line = line->next, i += 1) {
        buffer_get_bline(buf, i, &line2);
        ASSERT("line", line, line2);
    }
    for (line = buf->first_line, i = 0; line; line = line->next, i += 1) {
        buffer_get_bline_w_hint(buf, i, buf->last_line->prev, &line2);
        ASSERT("line", line, line2);
    }
}