blob: 6b013ed8db22860c86c522d7fd1d30468d28cd1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// -*- rust -*-
use std;
import std::str;
#[test]
fn test() {
let s = "hello";
let sb = str::buf(s);
let s_cstr = str::str_from_cstr(sb);
assert (str::eq(s_cstr, s));
let s_buf = str::str_from_buf(sb, 5u);
assert (str::eq(s_buf, s));
}
|