From 5c4e5aa3ff138408142a5d412b0809fae2e0a4f8 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 14 May 2002 13:05:43 +0000 Subject: Make regression tests locale-proof by setting some locale categories to C at run-time, and providing alternative output files for different sort orders. --- doc/src/sgml/regress.sgml | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml index 9f6ff60541b..64c5abdf8ce 100644 --- a/doc/src/sgml/regress.sgml +++ b/doc/src/sgml/regress.sgml @@ -1,4 +1,4 @@ - + Regression Tests @@ -177,22 +177,32 @@ Locale differences - The tests expect to run in plain C locale. This - should not cause any problems when you run the tests against a - temporary installation, since the regression test driver takes care - to start the server in C locale. However, if you run the tests - against an already-installed server that is using non-C locale settings, - you may see differences caused by varying rules for string sort order, - formatting of numeric and monetary values, and so forth. + If you run the tests against an already-installed server that was + initialized with a collation order locale different than C then + there may be differences due to sort order and follow-up + failures. The regression test suite is set up to handle this + problem by providing alternative result files that together are + known to handle a large number of locales. For example, for the + char test, the expected file + char.out handles the C and POSIX locales, + and the file char_1.out handles many other + locales. The regression test driver will automatically pick the + best file to match against when checking for success and for + computing failure differences. (This means that the regression + tests cannot detect whether the results are appropriate for the + configured locale. The tests will simply pick the one result + file that works best.) - In some locales the resulting differences are small and easily checked by - inspection. However, in a locale that changes the rules for formatting - of numeric values (typically by swapping the usage of commas and - decimal points), entry of some data values will fail, resulting in - extensive differences later in the tests where the missing data values - are supposed to be used. + If for some reason the existing expected files do not cover some + locale, you can add a new file. The naming scheme is + testname_digit.out. + The actual digit is not significant. Remember that the + regression test driver will consider all such files to be equally + valid test results. If the test results are platform-dependent, + the technique described in + should be used instead. -- cgit v1.2.3