On Mon, Aug 26, 2002 at 04:05:26PM -0400, John Peacock wrote:
> Specifically, in order to test that the locale stuff is working, I need to 
> have two different locales installed to switch between.  Currently, I am 
> using en_US and en_GB, but obviously that ignores most of the planet.
> 
> I was hoping to get some suggestion for how I can go about being sensitive 
> about how I do these tests, so that I get as few misleading failures as 
> possible.  One thought I had was to test for a series of locales during the 
> Makefile.PL processing, then update the t/test.t file for some combination 
> of the installed locales.  The problem I have already identified is that 
> `locale -a` may report erroneous information (partially installed locales), 
> so I am going to have to poke around some more.

Perhaps you can run a small suite of checks against things you find in the
locale list to be reasonably sure the locale is valid and fully installed
and pick two which seem to be so.


> In particular, I know I am going to have to skip that testing entirely on 
> platforms without any locale support (like CygWin), but I am still going to 
> have some issues where I may only have a single locale fully installed to 
> test.  I need something like the opposite of TODO, so that I can have 
> failures but warn that those failures are acceptable with caveats.  I 
> really need 'ok', 'not ok', and 'not ok but not to worry too much' so I can 
> handle all the various possibilities.

If you're going to have a test which suggests you simply ignore the failure
then just don't bother running the test.  A success tells you it's working
but a failure doesn't tell you it's broken, so it's not worth much.

What you should probably do is emit further diagnostic information on what
the test failure might mean like:  

    is($this, $that) || diag(<<MSG);
Please check that your $locale_i_was_testing_with locale is fully 
installed and try again.  Otherwise, contact the author.
MSG


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
Monkey tennis

Reply via email to