>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Wooo - nice, speedy testing response. I'm impressed!
>This is an error report generated automatically by CPANPLUS,
>version 0.045.
>
>Below is the error stack during 'make test':
>
>No tests defined for -0.01targz extension.
Emmm, I don't get this. I did define a simple test: t/1.t which contains 3
tests (really, it's two, but I got lazy and put an "open()" inside an ok()]
>Additional comments:
>
>Hello, Andrew Hamm! Thanks for uploading your works to CPAN.
thankyou for testing so quicky.
>Would it be too much to ask for a simple test script in the next
>release, so people can verify which platforms can successfully
>install them, as well as avoid regression bugs?
>
>A simple 't/use.t' that says:
>
>#!/usr/bin/env perl -w
>use strict;
>use Test;
>BEGIN { plan tests => 1 }
>
>use Your::Module::Here; ok(1);
>exit;
>__END__
>would be appreciated.
This is distinct from the t/1.t test? Is this "use.t" something new that
CPANPLUS supports? I'm still a bit old-fashioned, in that I'll either
download a .tar.gz or at best I'll use -MCPAN :-/ so I've never really met
use.t before. Anyway, it's a trivial inclusion if it's exactly as you put
it.
As far as the module is concerned, it can build on any platform (after all,
it's just a dumb little checksum algorithm) however one of the tests can
only be performed if the real "cksum" program exists. I don't know where
cksum has been ported, so I assume this test will only work on UNIX or
UNIX-like platforms.
For this module, I think the two essential tests are:
1) test the basic cksum algorithm against a string. This test will therefore
be platform independent, and will prove that the algorithm works on any
platform. I've currently tested against 'abcde' but that's probably too
small in principle :-) so I'd better put a much bigger but managable string
in....
The module does support reading from a file handle, however testing that is
fairly pointless I feel, since it would only be an alternative form of
testing the algorithm against string. Justification for this:
To read from a file, would firstly involve stuffing some known contents into
a file, and then opening a handle on this temp file and processing it. This
will be directly equivalent to checksumming a string! Also, it's possible
that on some platforms, my choice of tempfile would be inappropriate and
will fail. The test will actually test more about the environment and Perl
than any distinctly testable facility in the module :-(
See also the next point, which does actually test the read-from-handle
facility.
2) A very important test is to compare the algorithm against the real cksum
program; this will also test the ability to read from a file handle as a
bonus. In the test, I have elected to execute the cksum program against
/etc/profile, gather the two numbers returned (CRC and file size) and then
compare it with the algorithm executed against a file handle opened on
/etc/profile.
This will fail if:
- /etc/profile doesn't exist (ie non-UNIX)
- cksum does not exist (ie non-UNIX as far as I know)
So at this stage, not being a user of MAC's, VMS or other non-UNIX
platforms, I can't say how to code a reliable, portable test of equivalence
with the cksum program. This has got to be unsolvable on non-UNIX platforms
I would think.
Perhaps it's appropriate to put into the readme (including the page that
will appear on CPAN) that although the routine is expected to work
everywhere, the test of this is actually far more complicated than the
module itself, especially when "your platform" doesn't contain the cksum
program.
> If you are interested in making a more robust
> test suite, please see the Test::Simple, Test::More and
> Test::Tutorial manpages at
> <http://search.cpan.org/dist/Test-Simple/>.
This is funny! I built the module with h2xs; the generated file suggested
using Test::More, the perldoc for Test::More basically said: "Whoa there! If
you are new to testing, try Test::Simple" instead. So I did.
I still assert that I've written a test case, but if I should make it hook
into Test::More instead, then so be it. It would at least allow me the extra
power of testing against cksum program only on UNIX platforms.
So: final explicit recommendations are (can you confirm)
- implement a t/use.t which appears to perform a platform confirmation for
CPANPLUS?
- switch to Test::More instead of Test::Simple
- anything else I've maybe missed reading between the lines?
Ahhh - reading closely your output, it appears that "DARWIN" is a Macintosh
environment. So you can probably answer this: does any version of MAC/OS
have the cksum program? I understand that the very latest MAC/OS is based on
BSD; was cksum implemented too? If so, what's a reliable command line to
execute it, and what is the name of a file that is "always there" which I
can use? Is there any hope of finding cksum program on older versions of
MAC?
--
Apologies for the excessive sig.
Big Boss insists the mail server adds it.
---------------------------------------------------------------------
This email is from Civica Pty Limited and it, together with any attachments,
is confidential to the intended recipient(s) and the contents may be legally
privileged or contain proprietary and private information. It is intended
solely for the person to whom it is addressed. If you are not an intended
recipient, you may not review, copy or distribute this email. If received in
error, please notify the sender and delete the message from your system
immediately.Any views or opinions expressed in this email and any files
transmitted with it are those of the author only and may not necessarily
reflect the views of Civica and do not create any legally binding rights or
obligations whatsoever. Unless otherwise pre-agreed by exchange of hard copy
documents signed by duly authorised representatives, contracts may not be
concluded on behalf of Civica by email. Please note that neither Civica nor
the sender accepts any responsibility for any viruses and it is your
responsibility to scan the email and the attachments (if any). All email
received and sent by Civica may be monitored to protect the business
interests of Civica.
---------------------------------------------------------------------