Permalink
Browse files

[GH #893] add test for threaded say, mixup with \n

Test that for each say a \n is printed per thread.
Test it on a multi-core machine with

    watch prove -v t/op/say.t
  • Loading branch information...
Reini Urban
Reini Urban committed Dec 20, 2012
1 parent f79c114 commit b1d06620885c963b6f017dce1bf36211914697a6
Showing with 28 additions and 2 deletions.
  1. +28 −2 t/op/say.t
View
@@ -1,12 +1,12 @@
#!perl
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2012, Parrot Foundation.
use strict;
use warnings;
use lib qw( . lib ../lib ../../lib );
use Test::More;
-use Parrot::Test tests => 8;
+use Parrot::Test tests => 9;
=head1 NAME
@@ -94,6 +94,32 @@ CODE
/Null PMC in say/
OUTPUT
+pir_output_unlike( <<'CODE', <<'OUTPUT', 'threaded say' );
+.sub main :main
+ $P0 = get_global 'task'
+ $P1 = new 'Task', $P0
+ schedule $P1
+ $P2 = new 'Task', $P0
+ schedule $P2
+ $P3 = new 'Task', $P0
+ schedule $P3
+ $P4 = new 'Task', $P0
+ schedule $P4
+ wait $P1
+ wait $P2
+ wait $P3
+ wait $P4
+ sleep 0.2
+.end
+.sub task
+ say "line"
+.end
+CODE
+/lineline/
+OUTPUT
+
+
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4

0 comments on commit b1d0662

Please sign in to comment.