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/julia | |
| 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/julia')
| -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 |
3 files changed, 39 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 |
