We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c3421e commit dda16f8Copy full SHA for dda16f8
src/test/run-pass/str-append.rs
@@ -1,8 +1,30 @@
1
// -*- rust -*-
2
3
-fn main() {
+use std;
4
+import std._str;
5
+
6
+fn test1() {
7
let str s = "hello";
8
s += "world";
9
log s;
10
check(s.(9) == ('d' as u8));
11
}
12
13
+fn test2() {
14
+ // This tests for issue #163
15
16
+ let str ff = "abc";
17
+ let str a = ff + "ABC" + ff;
18
+ let str b = "ABC" + ff + "ABC";
19
20
+ log a;
21
+ log b;
22
23
+ check (_str.eq(a, "abcABCabc"));
24
+ check (_str.eq(b, "ABCabcABC"));
25
+}
26
27
+fn main() {
28
+ test1();
29
+ test2();
30
0 commit comments