Testing the other tsearch dictionaries

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Testing the other tsearch dictionaries
Дата
Msg-id 26249.1188009808@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Testing the other tsearch dictionaries
Список pgsql-hackers
I was a bit unhappy to realize just now that the patch Heikki sent in,
and I reviewed and applied, actually broke dict_synonym.  (Modifying a
string tends to modify the result of strlen() ...)  While we can't
cover *everything* in the regression tests, it now seems like a bad
idea that the tsearch.sql test has no coverage at all for the ispell,
synonym, or thesaurus templates.

The difficulty in testing these is that they require configuration
files, which the regression tests really can't install.  (If the
configuration were all inside the database it wouldn't be such a
problem, but that's a lost cause for 8.3...)

For synonym and thesaurus, we could rename the sample files that
are currently installed so that they'd be actually accessible as
config files, that is something likesynonym.syn.sample   => synonym-sample.synthesaurus.ths.sample =>
thesaurus-sample.ths
and then perform tests using those.  (This would also provide
test coverage for CREATE TEXT SEARCH DICTIONARY etc, which
wouldn't be a bad thing.)

The downsides I can see of this are (1) it'd expose some rather
useless test files as things that people could create dictionaries
with, and (2) someone might then alter the sample file and thereby
cause regression tests to fail on their installation.  Neither of
these seem terribly bad, but has anyone got an objection or better
idea?

Also, we don't currently have any sample config files for ispell;
but this is surely a loser from a documentation standpoint as well
as a testing standpoint, so I think we should provide some.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: SQL feature requests
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: max client limit in pgbench