⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 point.t

📁 source of perl for linux application,
💻 T
字号:
#!perl -TwBEGIN {    if ( $ENV{PERL_CORE} ) {        chdir 't';        @INC = ('../lib', 'lib');    }    else {        unshift @INC, 't/lib';    }}use strict;use Test::More tests => 11;BEGIN {    use_ok( 'Test::Harness::Point' );}my $point = Test::Harness::Point->new;isa_ok( $point, 'Test::Harness::Point' );ok( !$point->ok, "Should start out not OK" );$point->set_ok( 1 );ok( $point->ok, "should have turned to true" );$point->set_ok( 0 );ok( !$point->ok, "should have turned false" );$point->set_number( 2112 );is( $point->number, 2112, "Number is set" );$point->set_description( "Blah blah" );is( $point->description, "Blah blah", "Description set" );$point->set_directive( "Go now" );is( $point->directive, "Go now", "Directive set" );$point->add_diagnostic( "# Line 1" );$point->add_diagnostic( "# Line two" );$point->add_diagnostic( "# Third line" );my @diags = $point->diagnostics;is( @diags, 3, "Three lines" );is_deeply(    \@diags,    [ "# Line 1", "# Line two", "# Third line" ],    "Diagnostics in list context");my $diagstr = <<EOF;# Line 1# Line two# Third lineEOFchomp $diagstr;my $string_diagnostics = $point->diagnostics;is( $string_diagnostics, $diagstr, "Diagnostics in scalar context" );

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -