Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assertion.returned_arguments.x appear to have the wrong assert failure message #195

Open
matthiesenj opened this issue Jun 6, 2024 · 1 comment
Labels

Comments

@matthiesenj
Copy link

The english localization (in en.lua) seems to have the wrong assertion messages. They mention arguments the function is called with, but the keys indicate, they refer to the number of values returned by said function.

s:set("assertion.returned_arguments.positive", "Expected to be called with %s argument(s), but was called with %s")
s:set("assertion.returned_arguments.negative", "Expected not to be called with %s argument(s), but was called with %s")

This is further backed up by the example on the front page which uses the assertion.returned_arguments together with a custom message that mentions return arguments:

assert.message("the function 'f' did not return 2 arguments").returned_arguments(2, f())

I haven't checked if other localizations are affected, too.

@alerque
Copy link
Member

alerque commented Jun 6, 2024

Contributions are welcome, I'll help facilitate any PRs that address this.

@alerque alerque added the bug label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants