You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by do...@apache.org on 2005/05/18 15:28:37 UTC

svn commit: r170745 - /spamassassin/trunk/t/regexp_valid.t

Author: dos
Date: Wed May 18 06:28:37 2005
New Revision: 170745

URL: http://svn.apache.org/viewcvs?rev=170745&view=rev
Log:
forgot to take fileno of 

Modified:
    spamassassin/trunk/t/regexp_valid.t

Modified: spamassassin/trunk/t/regexp_valid.t
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/regexp_valid.t?rev=170745&r1=170744&r2=170745&view=diff
==============================================================================
--- spamassassin/trunk/t/regexp_valid.t (original)
+++ spamassassin/trunk/t/regexp_valid.t Wed May 18 06:28:37 2005
@@ -34,7 +34,8 @@
 
 # create a file descriptior for logging STDERR
 # (we do not want warnings for regexps we know are invalid)
-open(LOGERR, ">".IO::File->new_tmpfile()) || die "Cannot create LOGERR temp file";
+my $fh = IO::File->new_tmpfile();
+open(LOGERR, ">".fileno($fh)) || die "Cannot create LOGERR temp file";
 
 # quiet "used only once" warnings
 1 if *OLDERR;



Re: svn commit: r170745 - /spamassassin/trunk/t/regexp_valid.t

Posted by Michael Parker <pa...@pobox.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

dos@apache.org wrote:
> Author: dos
> Date: Wed May 18 06:28:37 2005
> New Revision: 170745
> 
> URL: http://svn.apache.org/viewcvs?rev=170745&view=rev
> Log:
> forgot to take fileno of 
> 
> Modified:
>     spamassassin/trunk/t/regexp_valid.t
> 
> Modified: spamassassin/trunk/t/regexp_valid.t
> URL: http://svn.apache.org/viewcvs/spamassassin/trunk/t/regexp_valid.t?rev=170745&r1=170744&r2=170745&view=diff
> ==============================================================================
> --- spamassassin/trunk/t/regexp_valid.t (original)
> +++ spamassassin/trunk/t/regexp_valid.t Wed May 18 06:28:37 2005
> @@ -34,7 +34,8 @@
>  
>  # create a file descriptior for logging STDERR
>  # (we do not want warnings for regexps we know are invalid)
> -open(LOGERR, ">".IO::File->new_tmpfile()) || die "Cannot create LOGERR temp file";
> +my $fh = IO::File->new_tmpfile();
> +open(LOGERR, ">".fileno($fh)) || die "Cannot create LOGERR temp file";
>  
>  # quiet "used only once" warnings
>  1 if *OLDERR;
> 
> 
> 


There is still something wonky with this.  Now instead it is creating
this file:
?      t/5

Maybe it just needs to clean up after itself.  A better option would be
to write to a file in t/log with the same name as the test so it will be
easy to debug down the road.

Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCi8aUG4km+uS4gOIRAmP1AJ9OEt9oJuqhRfIzONyXLBfCOK+n0wCfXNns
RJuQlstf81QIMeTdphwfk8Q=
=AJil
-----END PGP SIGNATURE-----