Skip to content

Adjust the existing Lua style guide #1004

@igormunkin

Description

@igormunkin

Considering the existing Lua style guide there is no mention for our test naming policy. This led to a little arguing in our patch list.

@Gerold103 claimed that we agreed to the following some time ago:

gh-####-description.test.lua

However, since we backport bugs related to the issues from other queues, the gh-#### prefix is ambigious. Thereby I guess the following pattern is the most convenient one for LuaJIT related tests:

<origin-issue-repo>-####-description.test.lua

Here are some examples:

  • LuaJIT-505-fold-bug-in-string-find.test.lua
  • tarantool-3196-bug-with-zero-hash-strings.test.lua

@kyukhin, @Totktonada, @Gerold103, @kostja, please dump your thoughts related to the naming policy here for the further Lua style guide amending.


Furthermore, all existing tests in LuaJIT suite seem to be written considering the current guideline and violate several practices mentioned by @Totktonada in the review:

  • Use local for variables (tap, test).
  • Use os.exit(test:check() and 0 or 1) at the end.

Please consider applying these comments to the example in out style guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    devTo be updated by the developers. Includes developer guidelines and many API elements.guidelines

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions