Add d_timegm to uconfig.sh to fix the generated uconfig.h.
[p5sagit/p5-mst-13.2.git] / lib / Test / Harness / t / process.t
CommitLineData
b965d173 1#!/usr/bin/perl -w
2
3use strict;
4use lib 't/lib';
5
6my $hires;
7
8BEGIN {
9 $hires = eval 'use Time::HiRes qw(sleep); 1';
10}
11
12use Test::More ( $^O eq 'VMS' ? ( skip_all => 'VMS' )
13 : $hires ? ( tests => 9 * 3 )
14 : ( skip_all => 'Need Time::HiRes' ) );
15
16use File::Spec;
17use TAP::Parser::Iterator::Process;
18
19my @expect = (
20 '1..5',
21 'ok 1 00000',
22 'ok 2',
23 'not ok 3',
24 'ok 4',
25 'ok 5 00000',
26);
27
28my $source = File::Spec->catfile( ($ENV{PERL_CORE} ? 'lib' : 't'),
29 'sample-tests', 'delayed' );
30
31for my $chunk_size ( 1, 4, 65536 ) {
32 for my $where ( 0 .. 8 ) {
33
34 my $proc = TAP::Parser::Iterator::Process->new(
35 { _chunk_size => $chunk_size,
36 command => [ $^X, $source, ( 1 << $where ) ]
37 }
38 );
39
40 my @got = ();
41 while ( defined( my $line = $proc->next_raw ) ) {
42 push @got, $line;
43 }
44
45 is_deeply \@got, \@expect,
46 "I/O ok with delay at position $where, chunk size $chunk_size";
47 }
48}