-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: adds extra test spec for testing the errors when calling after…
… a newline Also reworks test spec for this PR to be in more logical places.
- Loading branch information
1 parent
8f87db7
commit 0110da7
Showing
3 changed files
with
49 additions
and
46 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
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,27 @@ | ||
util = require("spec.util") | ||
|
||
describe("lua next-line function calls", function() | ||
it("allows calls on the next line in lua parsing mode", util.check_lua([=[ | ||
local function test(a) | ||
end | ||
test | ||
("hello world") | ||
]=])) | ||
|
||
it("allows string literal calls on the next line in lua parsing mode", util.check_lua([=[ | ||
local function test(a) | ||
end | ||
test | ||
"hello world" | ||
]=])) | ||
|
||
it("allows calls after multiline string literals in lua parsing mode", util.check_lua([=[ | ||
local function test(a): function() | ||
return function() end | ||
end | ||
test[[hello | ||
world]]() | ||
]=])) | ||
end) |
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