mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-07 14:00:00 -04:00
move all tests to top-level tests/ directory
This commit is contained in:
parent
d4e8d3e659
commit
63a88c873f
56 changed files with 72 additions and 72 deletions
7
tests/indent/lua/comment.lua
Normal file
7
tests/indent/lua/comment.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-- some
|
||||
-- comment
|
||||
|
||||
--[[
|
||||
another
|
||||
comment
|
||||
--]]
|
||||
12
tests/indent/lua/cond.lua
Normal file
12
tests/indent/lua/cond.lua
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
local x = 10
|
||||
|
||||
if x > 3 then
|
||||
x = 3
|
||||
elseif x < 3 then
|
||||
x = -3
|
||||
else
|
||||
if x > 0 then
|
||||
x = 1
|
||||
end
|
||||
x = 0
|
||||
end
|
||||
9
tests/indent/lua/func.lua
Normal file
9
tests/indent/lua/func.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
function foo(x)
|
||||
local bar = function(a, b, c)
|
||||
return a + b + c
|
||||
end
|
||||
return bar(
|
||||
x,
|
||||
1,
|
||||
2)
|
||||
end
|
||||
14
tests/indent/lua/loop.lua
Normal file
14
tests/indent/lua/loop.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
local x = 1
|
||||
|
||||
while x < 10 do
|
||||
x = x + 1
|
||||
break
|
||||
end
|
||||
|
||||
for i = 1,3 do
|
||||
x = x + i
|
||||
end
|
||||
|
||||
repeat
|
||||
x = x + 1
|
||||
until x > 100
|
||||
5
tests/indent/lua/string.lua
Normal file
5
tests/indent/lua/string.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
local s = [[
|
||||
a
|
||||
multiline
|
||||
string
|
||||
]]
|
||||
10
tests/indent/lua/table.lua
Normal file
10
tests/indent/lua/table.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
local a = {
|
||||
x = 1,
|
||||
y = 2,
|
||||
z = {
|
||||
1, 2, 3,
|
||||
},
|
||||
['hello world'] = {
|
||||
1, 2, 3
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue