Skip to content
This repository has been archived by the owner on Jul 31, 2021. It is now read-only.

Commit

Permalink
Using plan for testing, test on Linux only
Browse files Browse the repository at this point in the history
  • Loading branch information
cuonglm committed Sep 22, 2017
1 parent 5780bbc commit 639c232
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
5 changes: 2 additions & 3 deletions t/01-use.t
@@ -1,8 +1,7 @@
use v6;

use Test;
use lib 'lib';

use-ok('Linux::Process::SignalInfo', 'Linux::Process::SignInfo can be used!');
plan 1;

done-testing();
use-ok('Linux::Process::SignalInfo', 'Linux::Process::SignInfo can be used!');
6 changes: 2 additions & 4 deletions t/02-basic.t
@@ -1,10 +1,10 @@
use v6;

use Test;
use lib 'lib';

use Linux::Process::SignalInfo;

plan :skip-all<These tests are only for Linux> unless $*KERNEL.name eq 'linux';
plan 5;
dies-ok(
{ Linux::Process::SignalInfo.new },
'pid is required'
Expand All @@ -16,5 +16,3 @@ ok(
ok($signal_info.read, 'Reading process signal information');
ok($signal_info.error eq '', 'No error');
ok($signal_info.parse, 'Parsing signal information');

done-testing();
7 changes: 3 additions & 4 deletions t/03-error.t
@@ -1,16 +1,15 @@
use v6;

use Test;
use lib 'lib';

use Linux::Process::SignalInfo;

plan :skip-all<These tests are only for Linux> unless $*KERNEL.name eq 'linux';
plan 4;

ok(
my $signal_info = Linux::Process::SignalInfo.new(pid => 65537),
'New instance with non existed PID'
);
nok($signal_info.read, 'Reading non existed process');
ok($signal_info.error ne '', 'Error' ~ $signal_info.error);
nok($signal_info.parse, 'Empty data');

done-testing();

0 comments on commit 639c232

Please sign in to comment.