[Tarantool-patches] [PATCH v8 07/14] test: fix luacheck warnings W231 in test/sql-tap

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Jan 24 20:35:57 MSK 2021


Thanks for the patch!

On 21.01.2021 13:50, sergeyb at tarantool.org wrote:
> From: Sergey Bronnikov <sergeyb at tarantool.org>
> 
> W231 (Local variable is set but never accessed)
> 
> Part of #5464
> ---
> diff --git a/test/sql-tap/e_expr.test.lua b/test/sql-tap/e_expr.test.lua
> index 5f8b206d3..b488bdc60 100755
> --- a/test/sql-tap/e_expr.test.lua
> +++ b/test/sql-tap/e_expr.test.lua
> @@ -2554,9 +2550,6 @@ test:do_test(
>  -- evaluation of the THEN expression that corresponds to the first WHEN
>  -- expression that evaluates to true.
>  --
> -a = 0
> -b = 1
> -c = 0

These look like an artifact of a wrong conversion from TCL to Lua.
The variables are used in the SQL statements. I think the converter
thought it could just declare them as Lua variables to make visible
in SQL. Better keep them and add MUST_WORK_TEST if it is not here yet.

So in future we would see the expected variable values, and either
decide fix the tests or delete them entirely. The latter can easily
happen due to how much the type system was reworked.

>  test:do_execsql_test(
>      "e_expr-21.2.1",
>      [[


More information about the Tarantool-patches mailing list