[Ludiafuncs-hackers] Add regression tests

Zurück zum Archiv-Index

Fujii Masao masao****@gmail*****
2015年 8月 31日 (月) 17:44:15 JST


On Fri, Aug 28, 2015 at 2:14 PM, Fujii Masao <masao****@gmail*****> wrote:
> On Mon, Aug 24, 2015 at 3:09 PM,  <ishii****@nttda*****> wrote:
>> ・001_ludia_funcs_regress_textporter.patch

Attached is the updated version of the patch which provides
the regression tests for pgs2textporter1 function.
Could you review this version?

> +SELECT pgs2snippet1(1,300,1,'∇','∇',0,'データベース',pgs2textporter1('/tmp/sample.txt'));
>
> Could you tell me who will move sample.txt to /tmp? You are thinking that
> each developer will need to move that to /tmp manually whenever he or she
> wants to run the regression test for textporter? ISTM that it's not good
> approach.
>
> In pg_bigm, this kind of input file is placed in "data" directory and each
> pg_bigm regression test tries to read it from "data" directory. Like pg_bigm,
> what about placing the input file in "data" directory? Please see
> the regression test in pg_bigm to understand the idea.

I added all the input files into ludia_funcs/data directory and
changed the regression tests so that pgs2textporter1 reads
the input files from that ludia_funcs/data directory. This is
possible by using @abs_srcdir@ trick.

> +SELECT pgs2snippet1(1,300,1,'∇','∇',0,'データベース',pgs2textporter1('/tmp/sample.txt'));
> +SELECT pgs2snippet1(1,300,1,'∇','∇',0,'aaa',pgs2textporter1('/tmp/sample.txt'));
> +
> +SELECT pgs2snippet1(1,300,1,'∇','∇',0,repeat('x',300),repeat('x',300));
> +SELECT pgs2snippet1(1,300,1,'∇','∇',0,repeat('x',300),pgs2textporter1('/tmp/sample.txt'));
>
> Could you tell me why these four tests are required? ISTM that the first
> test is enough. I could not understand the purposes of other three tests.
> Could you elaborate them?

I included these tests in the patch, but still not sure the purpose
of them.

> +SELECT pgs2textporter1('/tmp/test.docx');
>
> Could you include test.docx file in the patch? This file also needs to be
> placed in "data" directory, I think.
>
> +SELECT pgs2textporter1('/tmp/test.xlsx');
>
> Same as above.

Your patch already included those files. Sorry for the noise...

> +SELECT pgs2textporter1('/tmp/test.docx') FROM generate_series(1,10);
>
> Could you tell me the purpose of this test?

I included this test in the patch, but still not sure its purpose.

> +SELECT pgs2textporter1();
> +SELECT pgs2textporter1('/tmp/test.docx', 1);
>
> I think that it's not worth doing these tests.

I excluded these tests from the patch.

> +CREATE DATABASE euc_db ENCODING 'EUC_JP' TEMPLATE template0;
> +\c euc_db
> +CREATE EXTENSION ludia_funcs;
> +SELECT pgs2textporter1('/tmp/test.docx');
>
> You should change this test according to the existing regression test
> that I recently committed.

I changed the tests according to the ludia_funcs.sql regression test.

> +SET ROLE 'testuser';
> +SET ludia_funcs.textporter_error = 'notice';
> +RESET ROLE;
>
> I think that it's not worth doing this test.

I excluded these tests from the patch.

Regards,

-- 
Fujii Masao
-------------- next part --------------
$B%F%-%9%H7A<00J30$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
$B%U%!%$%kL>(B: pgs2textporter1_regression_test_v2.patch
$B7?(B:         text/x-patch
$B%5%$%:(B:     46728 $B%P%$%H(B
$B @ bL@(B:       $BL5$7(B
Download 



Ludiafuncs-hackers メーリングリストの案内
Zurück zum Archiv-Index