about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile3
-rw-r--r--src/test/run-pass/task-comm-10.rs16
-rw-r--r--src/test/run-pass/task-comm-11.rs10
-rw-r--r--src/test/run-pass/task-life-0.rs7
4 files changed, 36 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
index 2e8deb7b3f5..63834799bfd 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -381,6 +381,9 @@ TASK_XFAILS := test/run-pass/acyclic-unwind.rs \
                test/run-pass/task-comm-7.rs \
                test/run-pass/task-comm-8.rs \
                test/run-pass/task-comm-9.rs \
+               test/run-pass/task-comm-10.rs \
+               test/run-pass/task-comm-11.rs \
+               test/run-pass/task-life-0.rs \
                test/run-pass/task-comm.rs \
                test/run-pass/threads.rs \
                test/run-pass/yield.rs
diff --git a/src/test/run-pass/task-comm-10.rs b/src/test/run-pass/task-comm-10.rs
new file mode 100644
index 00000000000..529ef6f51d8
--- /dev/null
+++ b/src/test/run-pass/task-comm-10.rs
@@ -0,0 +1,16 @@
+io fn start(chan[chan[str]] c) {
+    let port[str] p = port();
+    c <| chan(p);
+    auto a <- p;
+    auto b <- p;
+    // Never read the second string.
+}
+
+io fn main() {
+    let port[chan[str]] p = port();
+    auto child = spawn "start" start(chan(p));
+    auto c <- p;
+    c <| "A";
+    c <| "B";
+    yield;
+}
\ No newline at end of file
diff --git a/src/test/run-pass/task-comm-11.rs b/src/test/run-pass/task-comm-11.rs
new file mode 100644
index 00000000000..519eb699f8e
--- /dev/null
+++ b/src/test/run-pass/task-comm-11.rs
@@ -0,0 +1,10 @@
+io fn start(chan[chan[str]] c) {
+    let port[str] p = port();
+    c <| chan(p);
+}
+
+io fn main() {
+    let port[chan[str]] p = port();
+    auto child = spawn "child" start(chan(p));
+    auto c <- p;
+}
\ No newline at end of file
diff --git a/src/test/run-pass/task-life-0.rs b/src/test/run-pass/task-life-0.rs
new file mode 100644
index 00000000000..f15792fbcf7
--- /dev/null
+++ b/src/test/run-pass/task-life-0.rs
@@ -0,0 +1,7 @@
+fn main() -> () {
+    spawn child("Hello");
+}
+
+fn child(str s) {
+    
+}
\ No newline at end of file