Thanks for your help guys
My understanding of test scripts in a CPAN package is that they
are written from the assumption that when 'make test' is run the
current working directory will be where the package was unpacked
and 't' will be a subdirectory rather than cd'ing into 't' and
running them there.
If you don't have make test, you could try one of these (where
you would need to replace 't/*.t' with your platform's equivalent).
perl -e 'use Test::Harness; runtests(@ARGV)' t/*.t
or
perl -e 'use Test::Harness; runtests(<t/*.t>)'
or
perl -MTest::Harness -e 'runtests(<t/*.t>)'
All of which assume that you've already installed the module. If
you haven't you'll need to add something like -Iblib/lib (but then
if you haven't got make, the blib tree may not be properly set up).
I could rewrite my tests to check for the existance of desertnet.xml
or t/desertnet.xml (portable check of course) and use the right one.
But on the other hand if everything does work when you run one of the
above commands from the correct directory, it's probably not worth
the effort.
Thanks again
Grant
=====================================================================
Grant McLean | email: [EMAIL PROTECTED] | Lvl 8, 86 Lambton Quay
The Web Limited | WWW: www.web.co.nz | PO Box 15-175
Internet Solutions | Tel: (04) 495 8250 | Wellington
Awesome service | Fax: (04) 495 8259 | New Zealand
> -----Original Message-----
> From: Larry Moore [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 17, 2000 5:06 PM
> To: Paul Schinder
> Cc: Grant McLean; [EMAIL PROTECTED]
> Subject: Re: Beta release of XML::Simple 1.02b available for testing
> Importance: High
>
>
> At 21:32 -0500 16/02/2000, Larry Moore wrote:
> >At 21:19 -0500 16/02/2000, Paul Schinder wrote:
> >
> >>Try making a t folder inside the t folder and moving and
> >>desertnet.xml-source into it before running the test. When
> I do that
> >>in Linux, the test works:
> >>
> >>I don't know a good solution for this except a "if ($^O eq 'MacOS')"
> >>switch in the test.
> >>
> >>--
> >>Paul Schinder
> >>[EMAIL PROTECTED]
> >
> >Thanks, Paul. I'll try duplicating the contents of the :t:
> folder into a :t:t:
> and also ... to all test files ...
> my $SrcFile = File::Spec->catfile(':t', 'desertnet.xml-source');
> my $XMLFile = File::Spec->catfile(':t', 'desertnet.xml');
> 5_MemCopy.t:
> ok 1..7
> 4_MemShare.t all ok
> 3_Storable.t'
> 1..19
> ok 1
> ok 2
> ok 3
> ok 4
> ok 5
> not ok 6
> ok 7
> not ok 8
> ok 9
> not ok 10
> ok 11
> ok 12
> ok 13
> ok 14
> ok 15
> ok 16
> not ok 17
> ok 18
> ok 19
>
> 2_XMLout.t
> 1..160
> ok 1...ok 131
> # open(testoutput.xml): Invalid argument
> File 'External_HD:Attachments:XML-Simple-1.02b:t:2_XMLout.t'; Line 556
> 1_XMLin.t'
> 1..46
> ok 1... ok 23
> not ok 24
> # Could not find t:test1.xml in
> File 'External_HD:Attachments:XML-Simple-1.02b:t:1_XMLin.t'; Line 387
> 25:DataCompare: != HASH(0x20053c8)
> not ok 25
> ok 26
> ok 27
> # Could not find test2.xml in dir1:dir2:t:subdir:
> File 'External_HD:Attachments:XML-Simple-1.02b:t:1_XMLin.t'; Line 408
> not ok 28
> 29:DataCompare: != HASH(0x20037c8)
> not ok 29
> ok 30
> ok 31
> # read error.
> File 'External_HD:Perl:MacPerl
> ?:site_perl:XML:Parser:Expat.pm'; Line 438
>
>