2 # Copyright (C) 2006-2007, Parrot Foundation.
7 use lib qw( . lib ../lib ../../lib );
9 use Parrot::Test tests => 3;
13 t/pmc/io_iterator.t - test the I/O Iterator PMC described in PDD22
17 % prove t/pmc/io_iterator.t
21 Tests the I/O Iterator PMC described in PDD22.
25 # L<PDD22/I\/O Iterator PMC API/=item new>
26 pir_output_is( <<'CODE', <<'OUT', 'new', todo => 'not yet implemented' );
28 $P99 = 1 # TT #1242 replace with io object
30 say "ok 1 - $P0 = iter $P1"
36 # L<PDD22/I\/O Iterator PMC API/=item shift>
37 pir_output_is( <<'CODE', <<'OUT', 'shift', todo => 'not yet implemented' );
39 $P99 = 1 # TT #1242 replace with io object
44 if $S0 == 'abc' goto ok_1
47 say 'ok 1 - $S0 = shift $P1 # success'
49 # TT #1206 test more return values, including end of file
52 ok 1 - $I0 = shift $P1 # success
55 # L<PDD22/I\/O Iterator PMC API/=item get_bool (vtable)>
56 pir_output_is( <<'CODE', <<'OUT', 'get_bool (vtable)', todo => 'not yet implemented' );
58 $P99 = 1 # TT #1242 replace with io object
65 say 'ok 1 - $P0 # empty i/o object returns false'
67 # TT #1242 setup i/o object with two lines
71 say 'ok 2 - $P0 # i/o object with data returns true
81 say 'ok 3 - $P0 # i/o object with more data returns true'
91 say 'ok 4 - $P0 # i/o object with no more data returns false'
97 ok 1 - $P0 # empty i/o object returns false
98 ok 2 - $P0 # i/o object with data returns true
99 ok 3 - $P0 # i/o object with more data returns true
100 ok 4 - $P0 # i/o object with no more data returns false
105 # cperl-indent-level: 4
108 # vim: expandtab shiftwidth=4: