-
Notifications
You must be signed in to change notification settings - Fork 43
Description
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.