test: core: add bstr tests; update rope tests
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user