aboutsummaryrefslogtreecommitdiff
path: root/t/01argv.t
blob: 9dffd04cc083a76a0b87c955e0058b9042d2242e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -*- perl -*-

use lib 't';

use strict;
use warnings;
use Test::More tests => 4;
use POSIX::Run::Capture;

my $obj = new POSIX::Run::Capture;

# Initial ARGV is empty
is(0+@{$obj->argv}, 0);

# Set argv
$obj->set_argv('cat', 'file1', 'file2');
is(0+@{$obj->argv}, 3);
is_deeply($obj->argv, [ 'cat', 'file1', 'file2' ]);

# Unset argv
$obj->set_argv();
is(0+@{$obj->argv}, 0);

Return to:

Send suggestions and report system problems to the System administrator.