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@gmx.net