mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 10:20:11 -04:00
Add initial tests for Julia language indentation
This commit is contained in:
parent
639c22c52c
commit
fc3bfd8f89
4 changed files with 56 additions and 0 deletions
13
tests/indent/julia/argument_list.jl
Normal file
13
tests/indent/julia/argument_list.jl
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
function test(a::Number,
|
||||||
|
b::Float64,
|
||||||
|
c::Union{Float64, Integer},
|
||||||
|
d::Bool)
|
||||||
|
end
|
||||||
|
|
||||||
|
function test(
|
||||||
|
a::Number,
|
||||||
|
b::Float64,
|
||||||
|
c::Union{Float64, Integer},
|
||||||
|
d::Bool
|
||||||
|
)
|
||||||
|
end
|
||||||
11
tests/indent/julia/assignment.jl
Normal file
11
tests/indent/julia/assignment.jl
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
my_variable =
|
||||||
|
1 + 2 - 3 *
|
||||||
|
4 / 5 %
|
||||||
|
6
|
||||||
|
|
||||||
|
function test()
|
||||||
|
my_variable =
|
||||||
|
1 + 2 - 3 *
|
||||||
|
4 / 5 %
|
||||||
|
6
|
||||||
|
end
|
||||||
15
tests/indent/julia/parameter_list.jl
Normal file
15
tests/indent/julia/parameter_list.jl
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
function test(a, b, c, d, e)
|
||||||
|
vcat(a,
|
||||||
|
b,
|
||||||
|
c,
|
||||||
|
d,
|
||||||
|
e)
|
||||||
|
|
||||||
|
vcat(
|
||||||
|
a,
|
||||||
|
b,
|
||||||
|
c,
|
||||||
|
d,
|
||||||
|
e
|
||||||
|
)
|
||||||
|
end
|
||||||
17
tests/indent/julia_spec.lua
Normal file
17
tests/indent/julia_spec.lua
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
local Runner = require("tests.indent.common").Runner
|
||||||
|
local XFAIL = require("tests.indent.common").XFAIL
|
||||||
|
|
||||||
|
local run = Runner:new(it, "tests/indent/julia", {
|
||||||
|
tabstop = 4,
|
||||||
|
shiftwidth = 4,
|
||||||
|
softtabstop = 4,
|
||||||
|
expandtab = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
describe("indent Julia:", function()
|
||||||
|
describe("whole file:", function()
|
||||||
|
run:whole_file(".", {
|
||||||
|
expected_failures = {},
|
||||||
|
})
|
||||||
|
end)
|
||||||
|
end)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue