test: core: add bstr tests; update rope tests

This commit is contained in:
2026-02-03 14:47:25 +00:00
parent 2632feac32
commit 0d5a186d80
2 changed files with 67 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
#include <blue/core/bstr.h>
#include <blue/core/stream.h>
#include <stdio.h>
@@ -6,5 +7,15 @@ int main(void)
b_stream_read_line_s(b_stdin, b_stdout);
b_stream_write_char(b_stdout, '\n');
char s[16];
b_bstr str;
b_bstr_begin(&str, s, sizeof s);
b_stream_read_line_s(b_stdin, (b_stream *)&str);
b_stream_write_char((b_stream *)&str, '\n');
const char *e = b_bstr_end(&str);
fputs(e, stdout);
return 0;
}