ETL-Yertl
view release on metacpan or search on metacpan
t/command/ygrok/pattern/ps-x.t view on Meta::CPAN
command => '/usr/libexec/UserEventAgent (Aqua)',
},
{
pid => 300,
tty => '??',
status => 'S',
time => '0:39.88',
command => '/usr/sbin/distnoted agent',
},
);
test_ygrok( $file, $pattern, \@expect );
test_ygrok( $file, "%{POSIX.PSX}", \@expect )
};
subtest 'OpenBSD' => sub {
my $file = $SHARE_DIR->child( lines => openbsd => 'ps-x.txt' ),
my @expect = (
{
pid => 3713,
tty => '??',
status => 'S',
time => '0:00.03',
command => 'sshd: doug@ttyp0 (sshd)',
},
{
pid => 20045,
tty => 'p0',
status => 'Ss',
time => '0:00.02',
command => '-ksh (ksh)',
},
{
pid => 4243,
tty => 'p0',
status => 'R+',
time => '0:00.00',
command => 'ps -x',
},
);
test_ygrok( $file, $pattern, \@expect );
test_ygrok( $file, "%{POSIX.PSX}", \@expect )
};
subtest 'RHEL5' => sub {
my $file = $SHARE_DIR->child( lines => rhel5 => 'ps-x.txt' ),
my @expect = (
{
pid => 3075,
tty => 'pts/0',
status => 'Ss',
time => '0:00',
command => '/usr/local/bin/zsh',
},
{
pid => 5345,
tty => '?',
status => 'Sl',
time => '219:15',
command => 'starman master',
},
);
test_ygrok( $file, $pattern, \@expect );
test_ygrok( $file, "%{POSIX.PSX}", \@expect )
};
};
done_testing;
( run in 0.445 second using v1.01-cache-2.11-cpan-e93a5daba3e )