File tree 2 files changed +17
-1
lines changed
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: bc1316aaf4f2609b6f8542242d9c3ca65d0853bd
2
+ refs/heads/master: 7bfe4dba807ae908a247a34a4f72d0b610e6376f
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import std::str;
2
2
import std:: rope:: * ;
3
3
import std:: option;
4
4
import std:: uint;
5
+ import std:: vec;
5
6
6
7
//Utility function, used for sanity check
7
8
fn rope_to_string ( r : rope ) -> str {
@@ -146,3 +147,18 @@ fn char_at1() {
146
147
assert eq( r2, r3) ;
147
148
assert eq( bal2, bal3) ;
148
149
}
150
+
151
+ #[ test]
152
+ fn concat1 ( ) {
153
+ //Generate a reasonable rope
154
+ let chunk = of_str ( @ "123456789" ) ;
155
+ let r = empty ( ) ;
156
+ uint:: range ( 0 u, 10 u) { |_i|
157
+ r = append_rope ( r, chunk) ;
158
+ }
159
+
160
+ //Same rope, obtained with rope::concat
161
+ let r2 = concat ( vec:: init_elt ( chunk, 10 u) ) ;
162
+
163
+ assert eq( r, r2) ;
164
+ }
You can’t perform that action at this time.
0 commit comments