Re: test failures in mediatypes and autoload

Gisle Aas (aas@a.sn.no)
Wed, 20 Dec 1995 17:56:44 +0100


> 
> perl5.001m on Solaris 2.4
> 
> I've only just got libwww-perl and tried to install it. I get errors
> when I do a make test in mediatypes and autoload. (Verbose output
> included below) Any ideas?
> 
> thanks
> 
> simonb
> 
> ====================
> 
> base/mediatypes.....1..11
> expected 'text/html' for '/this.dir/file.html', got 'application/octet-stream'
> nok ok 1
> expected 'text/html' for 'test.gif.htm', got 'application/octet-stream'
> nok ok 2
> expected 'text/plain' for 'test.txt.gz', got 'application/octet-stream'
> encoding: expected: 'gzip', got 'gzip'
> nok ok 3
> ok 4
> expected 'application/x-tar' for 'lwp-0.03.tar.Z', got 'application/octet-stream'
> encoding: expected: 'compress', got 'compress'
> nok ok 5
> ok 6
> ok 7
> ok 8
> expected 'image/gif' for 'http://www/foo/test.gif?search+x#frag', got 'application/octet-stream'
> nok ok 9
> ok 10
> expected 'image/x-portable-pixmap' for 'x.ppm.Z.UU', got 'application/octet-stream'
> encoding: expected: 'compress x-uuencode', got 'compress x-uuencode'
> nok ok 11
> Image suffixes: 
> FAILED on test 1

I would not worry about these.  They are probably caused by the library 
finding a ~/.mime.types file and using it.  The test ought to be rewritten.

> =======================
> 
> and autoload
> 
> =======================
> 
> local/autoload......Use of uninitialized value at .././blib/LWP/UserAgent.pm line 256.
> 1..1
> not ok 1
> FAILED on test 1

This one is strange.  You might try to change the test so that it prints the 
errormessage in addition to the "not ok 1\n" string, like this:

--- autoload.t  1995/08/17 14:00:23     1.4
+++ autoload.t  1995/12/20 16:54:11
@@ -22,5 +22,6 @@
 if ($response->isSuccess) {
     print "ok 1\n";
 } else {
+    print $response->errorAsHTML;
     print "not ok 1\n";
 }

--Gisle