aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/lib-str-buf.rs
blob: 7ba19e925d76d53f08b5c52e63b45123408bea87 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// -*- rust -*-

use std;
import std._str;

fn main() {
    auto s = "hello";
    auto sb = _str.rustrt.str_buf(s);
    auto s_cstr = _str.rustrt.str_from_cstr(sb);
    check (_str.eq(s_cstr, s));
    auto s_buf = _str.rustrt.str_from_buf(sb, 5u);
    check (_str.eq(s_buf, s));
}