[Rt-commit] rt branch, 4.0/remove-test-file-content-diag, created. rt-4.0.19-72-g79b4a58

? sunnavy sunnavy at bestpractical.com
Thu Apr 10 12:44:08 EDT 2014


The branch, 4.0/remove-test-file-content-diag has been created
        at  79b4a58dd0f9270a29b35206c4e5ef0974fa774e (commit)

- Log -----------------------------------------------------------------
commit 79b4a58dd0f9270a29b35206c4e5ef0974fa774e
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Apr 11 00:24:50 2014 +0800

    remove diag call in RT::Test::file_content
    
    the main reason to remove it is it causes t/web/cf_access.t to fail no
    warnings tests under TEST_VERBOSE=1 mode. the warning is like:
    
        Name "RT::Test::TODO" used only once: possible typo at .../Test/Builder.pm line 2244
    
    though we can also get around it by increasing $Test::Builder::Level in
    RT::Test::file_content or never call file_content in compilation stage(e.g. in
    a BEGIN block or "use constant ..."), imo it doesn't worth it.

diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index b15c03d..51bf031 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -1596,8 +1596,6 @@ sub file_content {
 
     $path = File::Spec->catfile( @$path ) if ref $path eq 'ARRAY';
 
-    Test::More::diag "reading content of '$path'" if $ENV{'TEST_VERBOSE'};
-
     open( my $fh, "<:raw", $path )
         or do {
             warn "couldn't open file '$path': $!" unless $args{noexist};

-----------------------------------------------------------------------


More information about the rt-commit mailing list