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

char *str = "hello\nworld";

void test(buffer_t *buf, mark_t *cur) {
    char *data;
    bint_t data_len;
    mark_move_beginning(cur);
    mark_insert_after(cur, "s", 1);
    buffer_get(buf, &data, &data_len);
    ASSERT("insa", 0, strncmp("shello\nworld", data, data_len));
    ASSERT("col", 0, cur->col);
}