From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Making the regression tests locale-proof |
Date: | 2002-05-12 15:46:53 |
Message-ID: | Pine.LNX.4.44.0205121652440.1303-100000@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane writes:
> In practice we could perhaps use test data that doesn't hit any of the
> special cases in the popular languages. But I wonder whether this would
> not be shirking our responsibility as testers. Seems like if you avoid
> exercising these kinds of cases, you avoid finding corner-case bugs.
There is a locale test suite under src/test/locale, which isn't very well
known currently. There we can test the collation order in the wildest
extremes for any particular locale. For the main test suite, I think we
can boldly assume that if sorting works at all then it would also work
equally well if more complicated strings were substituted, since the
actual collating isn't done by us anyway.
What I'm thinking now is to simply collect a number of possible results
and store expected files char_0.out, char_1.out, etc. and have the driver
try all of these, basically meaning "any of these may be right".
The alternative I had in the back of my head was to query the locale and
prepare files char_en.out, char_de.out, etc. but as you showed, we can't
rely on these locales working in a particular way.
--
Peter Eisentraut peter_e(at)gmx(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Rod Taylor | 2002-05-12 15:53:08 | TRUNCATE |
Previous Message | Tom Lane | 2002-05-12 15:37:51 | Re: Further info : Very high load average but no cpu utilization ? |