forked from Kampfkarren/selene
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change how arguments passed are counted (Kampfkarren#120)
* add gitattribute to fix .stderr files * fix arguments count * fix single-quotes * assume at least one return value * update changelog * add test cases
- Loading branch information
1 parent
4be3470
commit f0d05f3
Showing
6 changed files
with
74 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.stderr text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
assert(true, "message") | ||
assert(call()) | ||
assert(call(), "this is ok") | ||
assert(...) | ||
|
||
assert(true) | ||
assert(true, "message", call()) | ||
assert(true, "message", ...) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[[assert.args]] | ||
type = "any" | ||
|
||
[[assert.args]] | ||
type = "string" | ||
required = "A failed assertion without a message is unhelpful to users." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
error[incorrect_standard_library_use]: standard library function `assert` requires 2 parameters, 1 passed | ||
|
||
┌── assert.lua:6:1 ─── | ||
│ | ||
6 │ assert(true) | ||
│ ^^^^^^^^^^^^ | ||
│ | ||
|
||
error[incorrect_standard_library_use]: standard library function `assert` requires 2 parameters, 3 passed | ||
|
||
┌── assert.lua:7:1 ─── | ||
│ | ||
7 │ assert(true, "message", call()) | ||
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
│ | ||
|
||
error[incorrect_standard_library_use]: standard library function `assert` requires 2 parameters, 3 passed | ||
|
||
┌── assert.lua:8:1 ─── | ||
│ | ||
8 │ assert(true, "message", ...) | ||
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
│ | ||
|