Skip to content

Commit

Permalink
Add issue #163 testcase to str-append testcase.
Browse files Browse the repository at this point in the history
  • Loading branch information
froystig committed Sep 21, 2010
1 parent 3c3421e commit dda16f8
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/test/run-pass/str-append.rs
@@ -1,8 +1,30 @@
// -*- rust -*-

fn main() {
use std;
import std._str;

fn test1() {
let str s = "hello";
s += "world";
log s;
check(s.(9) == ('d' as u8));
}

fn test2() {
// This tests for issue #163

let str ff = "abc";
let str a = ff + "ABC" + ff;
let str b = "ABC" + ff + "ABC";

log a;
log b;

check (_str.eq(a, "abcABCabc"));
check (_str.eq(b, "ABCabcABC"));
}

fn main() {
test1();
test2();
}

0 comments on commit dda16f8

Please sign in to comment.