[Tarantool-patches] [PATCH v6 08/25] Fix luacheck warnings in test/app-tap

Alexander Turenko alexander.turenko at tarantool.org
Mon Jun 1 16:37:15 MSK 2020


> -local function execute_and_verify(test, client, input, exp_output, name)
> -    test:test(name, function(test)
> +local function execute_and_verify(testcase, client, input, exp_output, name)
> +    testcase:test(name, function(test)

Please, don't forbid redefinitions. I often use it for 'standard' names
like 'opts', 'ok', 'err', 'test'. It allows to write code blocks in the
same style:

 | local ok, err = <...>
 | <...>
 | local ok, err = <...>

Instead of lopsided way (which also give additional problems, when you
change such code):

 | local ok, err = <...>
 | <...>
 | ok, err = <..>

Or with artificial declarations at block start:

 | local ok, err
 | <...>
 | ok, err = <...>
 | <...>
 | ok, err = <...>

I don't like the requirement to use 'testcase', 'testcasecase' or
'test2', 'test3' to name usual 'test' variable.

WBR, Alexander Turenko.


More information about the Tarantool-patches mailing list