April 14, 2012 | 82% of Perl Testing | Back Next |
SKIP: { skip $why, $how_many unless $have_some_feature;
ok( foo(), $test_name ); is( foo(42), 23, $test_name ); };
Used when tests are not meaningful except under certain conditions
Example: Tests which should only be run on Win32
SKIP: { skip "Not Win32", 1 unless $^O =~ /win32/i;
like ($^O, qr/win32/i, "This is Win32"); }
Home Last TOC | Copyright © 2012 James E Keenan | Back Next |