diff options
| author | Ronan Arraes Jardim Chagas <ronisbr@gmail.com> | 2023-10-28 16:47:18 -0300 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2023-10-29 01:37:31 +0200 |
| commit | fc3bfd8f89a9a9ec088d686c68e45a35106df4de (patch) | |
| tree | 44f2ce83e7938b5e52a75c50650dab9711e97634 /tests/indent | |
| parent | Improve indentation in Julia language (diff) | |
| download | nvim-treesitter-fc3bfd8f89a9a9ec088d686c68e45a35106df4de.tar nvim-treesitter-fc3bfd8f89a9a9ec088d686c68e45a35106df4de.tar.gz nvim-treesitter-fc3bfd8f89a9a9ec088d686c68e45a35106df4de.tar.bz2 nvim-treesitter-fc3bfd8f89a9a9ec088d686c68e45a35106df4de.tar.lz nvim-treesitter-fc3bfd8f89a9a9ec088d686c68e45a35106df4de.tar.xz nvim-treesitter-fc3bfd8f89a9a9ec088d686c68e45a35106df4de.tar.zst nvim-treesitter-fc3bfd8f89a9a9ec088d686c68e45a35106df4de.zip | |
Add initial tests for Julia language indentation
Diffstat (limited to 'tests/indent')
| -rw-r--r-- | tests/indent/julia/argument_list.jl | 13 | ||||
| -rw-r--r-- | tests/indent/julia/assignment.jl | 11 | ||||
| -rw-r--r-- | tests/indent/julia/parameter_list.jl | 15 | ||||
| -rw-r--r-- | tests/indent/julia_spec.lua | 17 |
4 files changed, 56 insertions, 0 deletions
diff --git a/tests/indent/julia/argument_list.jl b/tests/indent/julia/argument_list.jl new file mode 100644 index 000000000..747a36efc --- /dev/null +++ b/tests/indent/julia/argument_list.jl @@ -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 diff --git a/tests/indent/julia/assignment.jl b/tests/indent/julia/assignment.jl new file mode 100644 index 000000000..798b889de --- /dev/null +++ b/tests/indent/julia/assignment.jl @@ -0,0 +1,11 @@ +my_variable = + 1 + 2 - 3 * + 4 / 5 % + 6 + +function test() + my_variable = + 1 + 2 - 3 * + 4 / 5 % + 6 +end diff --git a/tests/indent/julia/parameter_list.jl b/tests/indent/julia/parameter_list.jl new file mode 100644 index 000000000..fc9e6d262 --- /dev/null +++ b/tests/indent/julia/parameter_list.jl @@ -0,0 +1,15 @@ +function test(a, b, c, d, e) + vcat(a, + b, + c, + d, + e) + + vcat( + a, + b, + c, + d, + e + ) +end diff --git a/tests/indent/julia_spec.lua b/tests/indent/julia_spec.lua new file mode 100644 index 000000000..a89f9f493 --- /dev/null +++ b/tests/indent/julia_spec.lua @@ -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) |
