Re: Add regression tests for ROLE (USER)

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: Add regression tests for ROLE (USER)
Дата
Msg-id alpine.DEB.2.02.1307151742060.3991@localhost6.localdomain6
обсуждение исходный текст
Ответ на Re: Add regression tests for ROLE (USER)  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Add regression tests for ROLE (USER)  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
> I simply don't understand how we can be getting any meaningful test
> coverage out of those cases.  I mean, if we want to check every bit of
> syntax that could lead to a syntax error, we could probably come up
> with a near-infinite number of test cases:

I think that it would be enough to check for expected 
keywords/identifier/stuff whether the syntax error reported make sense. 
Basically the parser reports the first found inconsistency.
 1. CREAT TABLE foo (x int); 2. CREATE TABL foo (x int); 3. CREATER TABLE foo (x int); -- same as 1 4. CREATE TABLES
foo(x int); -- same as 2 5. CREATE CREATE TABLE foo (x int); -- hmmm. 6. CREATE TABLE foo [x int); 7. CREATE TABLE foo
(xint]; 8. CREATE TABLE foo [x int]; -- same as 6 & 7 9. CREATE TABLE (x int); A. CREATE foo (x int); -- same as 2
 

This level of testing can be more or less linear in the number of token.

-- 
Fabien.



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Add regression tests for ROLE (USER)
Следующее
От: ivan babrou
Дата:
Сообщение: Re: Millisecond-precision connect_timeout for libpq