Example 6-9. examples/intro/skip.t
#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests => 2;
like( `/sbin/ifconfig`, qr/eth0/ );
SKIP: {
skip "Windows related tests", 1 if $^O !~ /Win/i;
like( `ipconfig`, qr/Windows IP Configuration/ );
}$ perl skip.t ok 1 ok 2 # skip Windows related tests 1..2
| Prev | Home (Copyright Gabor Szabo) Perl Training Israel | Next |
| Platform dependent tests | Up | My own test functions |