no_plan.t
来自「source of perl for linux application,」· T 代码 · 共 29 行
T
29 行
#!/usr/bin/perl -wBEGIN { if( $ENV{PERL_CORE} ) { chdir 't'; @INC = ('../lib', 'lib'); } else { unshift @INC, 't/lib'; }}use Test::More tests => 6;my $tb = Test::Builder->create;$tb->level(0);#line 19ok !eval { $tb->plan(tests => undef) };is($@, "Got an undefined number of tests at $0 line 19.\n");#line 23ok !eval { $tb->plan(tests => 0) };is($@, "You said to run 0 tests at $0 line 23.\n");#line 27ok !eval { $tb->ok(1) };is( $@, "You tried to run a test without a plan at $0 line 27.\n");
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?