aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/lib-str-buf.rs
blob: bd5cb036a699fb4fd1a74f442321cbc5c205efe3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// xfail-stage0
// -*- 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));
}