Skip to content

Commit 910b781

Browse files
brsongraydon
authored andcommitted
---
yaml --- r: 1788 b: refs/heads/master c: 0bcf493 h: refs/heads/master v: v3
1 parent 3caf9b3 commit 910b781

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: cddd8094da090bb5522aec3c0b344b8014d37d2d
2+
refs/heads/master: 0bcf49305cf34d6894c94b2eb8efcb3c022ffc0d

trunk/src/test/run-pass/task-comm-16.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ impure fn test_vec() {
3434
check (v1.(2) == 2);
3535
}
3636

37+
impure fn test_str() {
38+
let port[str] po = port();
39+
let chan[str] ch = chan(po);
40+
let str s0 = "test";
41+
42+
ch <| s0;
43+
44+
let str s1;
45+
s1 <- po;
46+
47+
check (s1.(0) as u8 == 't' as u8);
48+
check (s1.(1) as u8 == 'e' as u8);
49+
check (s1.(2) as u8 == 's' as u8);
50+
check (s1.(3) as u8 == 't' as u8);
51+
}
52+
3753
impure fn test_tup() {
3854
type t = tup(int, u8, char);
3955

@@ -99,6 +115,7 @@ impure fn test_chan() {
99115
impure fn main() {
100116
test_rec();
101117
test_vec();
118+
test_str();
102119
test_tup();
103120
test_tag();
104121
test_chan();

0 commit comments

Comments
 (0)