Claude said:
>         Hello,
>
> I tried to create a test suite file containing the following code:
>
> ------ clip -------
> #! /usr/local/bin/perl
>
> use strict;
> use Test::Harness qw( &runtests $verbose );
> $verbose=1;
> my @AoC = ( "t/00.pl" );
> my $len = @AoC;
> print "1..$len\n";

This line should be in the test scripts rather than the harness.

> runtests( @AoC );
> ------ clip -------
>
> The file t/00.pl contains the following lines:
>
> ------ clip -------
> #! /usr/local/bin/perl
>
> print "ok\n";

Here you want something like:

use Test::More tests => 1;

my $x = "qaz";
is $x, "qaz", "qaz matches";

> What am I doing wrong?

There is usually no need for your first file.  The standard way to set
things up is to put the tests in the t directory, let MakeMaker do its
magic, and then run make test.  Unless you have specific requirements
which preclude this, I would suggest that approach.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to