Ignoring white space in regression tests really a good idea?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Ignoring white space in regression tests really a good idea?
Дата
Msg-id 19271.1258843782@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Ignoring white space in regression tests really a good idea?
Список pgsql-hackers
pg_regress compares expected and actual output using "diff -w"
(a/k/a --ignore-all-space).  We have always done this, and I think
the idea was to avoid getting a lot of useless diff noise when the
only real difference is that one column value in a tabular display is
wider than expected.  I'm wondering if it's such a good idea though.
I just noticed that -w was masking a couple of recent changes in the
regression outputs, notably this one in create_cast:
 SELECT 1234::int4::casttesttype; -- No cast yet, should fail ERROR:  cannot cast type integer to casttesttype LINE 1:
SELECT1234::int4::casttesttype;
 
!                ^ CREATE CAST (int4 AS casttesttype) WITH INOUT; SELECT 1234::int4::casttesttype; -- Should work now
casttesttype
 
--- 53,59 ---- SELECT 1234::int4::casttesttype; -- No cast yet, should fail ERROR:  cannot cast type integer to
casttesttypeLINE 1: SELECT 1234::int4::casttesttype;
 
!                          ^ CREATE CAST (int4 AS casttesttype) WITH INOUT; SELECT 1234::int4::casttesttype; -- Should
worknow  casttesttype 
 

If one supposes that one part of what this test is doing is checking
which part of the construct is pointed to by the error cursor, then
using -w in the check renders it useless.

I'm thinking maybe we should remove -w.  Comments?
        regards, tom lane


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

Предыдущее
От: "Florian G. Pflug"
Дата:
Сообщение: Re: DEFAULT of domain ignored in plpgsql (8.4.1)
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Ignoring white space in regression tests really a good idea?