File: autovivifyfh.t

package info (click to toggle)
libipc-run-perl 20231003.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 844 kB
  • sloc: perl: 6,255; makefile: 5
file content (11 lines) | stat: -rw-r--r-- 249 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
use strict;
use warnings;

use IPC::Run;
use Test::More tests => 3;

my $h = IPC::Run::start( [ $^X, '-le', 'for (1..10) { print $_ }' ], '>pipe', my $fh );
ok $h;
my @content = <$fh>;
is_deeply \@content, [ map { "$_\n" } (1..10) ];
ok $h->finish;