Gisle Aas schrieb am 2001-09-12, 15:05:

>"Gerrit Haase" <[EMAIL PROTECTED]> writes:
[snip]
>> -- 
>> diff -ur URI-1.16-orig/t/heuristic.t URI-1.16/t/heuristic.t
>> --- URI-1.16-orig/t/heuristic.t      Tue Feb 27 21:02:22 2001
>> +++ URI-1.16/t/heuristic.t   Fri Sep  7 21:29:42 2001
>> @@ -6,8 +6,8 @@
>>  print "1..14\n";
>>  
>>  use URI::Heuristic qw(uf_urlstr uf_url);
>> -$URI::Heuristic::DEBUG++;
>> -open(STDERR, ">&STDOUT");  # redirect STDERR
>> +#$URI::Heuristic::DEBUG++;
>> +#open(STDERR, ">&STDOUT");  # redirect STDERR
>
>But this patch only hides the symptoms of some other problem with
>cygwin AFAICT.  This test can be reduced into something that says:
>
>   print "1..2\n";
>   open(STDERR, ">&STDOUT");  # redirect STDERR
>   print STDERR "xxx\n";
>   print "ok 1\n";
>   print STDERR "yyy\n";
>   print "ok 2\n";
>
>Does this test succeed for you?  What is the output when you redirect
>the output of this test to a file?

Yes, see previous mail.

>Does the test succeed if you add '$| = 1;' to the top of it?

I build again and added '$| = 1;' at the top of t/heuristic.t ->
====================t/heuristic.t===============================
if (-f "OFFLINE") {
   print "1..0";
   exit;
}

$| = 1;

print "1..14\n";

use URI::Heuristic qw(uf_urlstr uf_url);
$URI::Heuristic::DEBUG++;
open(STDERR, ">&STDOUT");  # redirect STDERR
[...]
====================t/heuristic.t===============================

I got the following now (crazy):
================================
$ make test
PERL_DL_NONLAZY=1 /bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl5/5.6.1/cygwin-multi 
-I/
usr/lib/perl5/5.6.1 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests 
@AR
GV;' t/*.t
t/abs...............ok
t/clone.............ok
t/data..............ok
t/escape............ok
t/file..............ok
t/generic...........ok
t/heuristic.........FAILED test 13
        Failed 1/14 tests, 92.86% okay
t/http..............ok
t/ldap..............ok
t/mailto............ok
t/mix...............ok
t/news..............ok
t/old-absconf.......ok
t/old-base..........ok
t/old-relbase.......ok
t/pop...............ok
t/query.............ok
t/rfc2732...........ok
t/roy-test..........ok
t/rsync.............ok
Failed Test   Status Wstat Total Fail  Failed  List of Failed
------------------------------------------------------------------------------------------

t/heuristic.t                 14    1   7.14%  13
Failed 1/20 test scripts, 95.00% okay. 1/345 subtests failed, 99.71% okay.
make: *** [test_dynamic] Error 255

$ perl -Mblib t/heuristic.t
Using /perl/cpantest/done/URI-1.16/blib
1..14
uf_uristr: resolving http://www.sn.no/
uf_uristr: ==> http://www.sn.no/
ok 1
uf_uristr: resolving /etc/passwd
uf_uristr: ==> file:/etc/passwd
ok 2
uf_uristr: resolving ./foo.txt
uf_uristr: ==> file:./foo.txt
ok 3
uf_uristr: resolving ftp.aas.no/lwp.tar.gz
uf_uristr: ==> ftp://ftp.aas.no/lwp.tar.gz
ok 4
uf_uristr: resolving C:\CONFIG.SYS
uf_uristr: ==> file:C:\CONFIG.SYS
ok 5
uf_uristr: resolving perl/camel.gif
uf_uristr: gethostbyname('www.perl.bv')...no
uf_uristr: gethostbyname('www.perl.com')...yes
uf_uristr: ==> http://www.perl.com/camel.gif
ok 6
uf_uristr: resolving perl/camel.gif
uf_uristr: gethostbyname('www.perl.co.uk')...yes
uf_uristr: ==> http://www.perl.co.uk/camel.gif
ok 7
uf_uristr: resolving perl
uf_uristr: gethostbyname('www.perl.org')...yes
uf_uristr: ==> http://www.perl.org
ok 8
uf_uristr: resolving perl
uf_uristr: ==> http://perl
ok 9
uf_uristr: resolving http:80
uf_uristr: ==> http:80
ok 10
uf_uristr: resolving mailto:[EMAIL PROTECTED]
uf_uristr: ==> mailto:[EMAIL PROTECTED]
ok 11
uf_uristr: resolving [EMAIL PROTECTED]
uf_uristr: ==> mailto:[EMAIL PROTECTED]
ok 12
uf_uristr: resolving [EMAIL PROTECTED]
uf_uristr: ==> mailto:[EMAIL PROTECTED]
ok 13
uf_uristr: resolving gopher.sn.no
uf_uristr: ==> gopher://gopher.sn.no
ok 14

$ perl -Mblib t/heuristic.t 2>&1 | tee log.test
Using /perl/cpantest/done/URI-1.16/blib
1..14
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
ok 9
ok 10
ok 11
ok 12
uf_uristr: resolving http://www.sn.no/
uf_uristr: ==> http://www.sn.no/
uf_uristr: resolving /etc/passwd
uf_uristr: ==> file:/etc/passwd
uf_uristr: resolving ./foo.txt
uf_uristr: ==> file:./foo.txt
uf_uristr: resolving ftp.aas.no/lwp.tar.gz
uf_uristr: ==> ftp://ftp.aas.no/lwp.tar.gz
uf_uristr: resolving C:\CONFIG.SYS
uf_uristr: ==> file:C:\CONFIG.SYS
uf_uristr: resolving perl/camel.gif
uf_uristr: gethostbyname('www.perl.bv')...no
uf_uristr: gethostbyname('www.perl.com')...yes
uf_uristr: ==> http://www.perl.com/camel.gif
uf_uristr: resolving perl/camel.gif
uf_uristr: gethostbyname('www.perl.co.uk')...yes
uf_uristr: ==> http://www.perl.co.uk/camel.gif
uf_uristr: resolving perl
uf_uristr: gethostbyname('www.perl.org')...yes
uf_uristr: ==> http://www.perl.org
uf_uristr: resolving perl
uf_uristr: ==> http://perl
uf_uristr: resolving http:80
uf_uristr: ==> http:80
uf_uristr: resolving mailto:[EMAIL PROTECTED]
uf_uristr: ==> mailto:[EMAIL PROTECTED]
uf_uristr: resolving [EMAIL PROTECTED]
uf_uristr: ==> mailto:[EMAIL PROTECTED]
uf_uristok 13
ok 14
r: resolving [EMAIL PROTECTED]
uf_uristr: ==> mailto:[EMAIL PROTECTED]
uf_uristr: resolving gopher.sn.no
uf_uristr: ==> gopher://gopher.sn.no


>>  print "not " unless uf_urlstr("http://www.sn.no/";) eq "http://www.sn.no/";;
>>  print "ok 1\n";
>> 
[snap]

Gerrit


-- 
=^..^=

Reply via email to