Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SKIP some tests

  • SKIP
use strict;
use warnings;

use Test::More tests => 2;

SKIP: {
    skip "Linux related tests", 1 if $^O ne 'linux';
    like( `/sbin/ifconfig`, qr/eth0|enp0s31f6/ );
}

SKIP: {
    skip "Windows related tests", 1 if $^O !~ /MSWin/i;
    like( `ipconfig`, qr/Windows IP Configuration/ );
}

Output:

1..2
ok 1
ok 2 # skip Windows related tests