mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
add ql indent tests
This commit is contained in:
parent
1c41d6f825
commit
9d6d348418
3 changed files with 36 additions and 0 deletions
9
tests/indent/ql/module.ql
Normal file
9
tests/indent/ql/module.ql
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import go
|
||||
|
||||
module Test {
|
||||
class Foo extends Type {
|
||||
Foo() { this.getName() = "Foo" }
|
||||
}
|
||||
}
|
||||
|
||||
select 1
|
||||
7
tests/indent/ql/qlpack.yml
Normal file
7
tests/indent/ql/qlpack.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
library: false
|
||||
name: test/test
|
||||
version: 0.0.1
|
||||
dependencies:
|
||||
codeql/go-all: '*'
|
||||
|
||||
20
tests/indent/ql_spec.lua
Normal file
20
tests/indent/ql_spec.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
local Runner = require("tests.indent.common").Runner
|
||||
|
||||
local run = Runner:new(it, "tests/indent/ql", {
|
||||
tabstop = 2,
|
||||
shiftwidth = 2,
|
||||
softtabstop = 0,
|
||||
expandtab = true,
|
||||
})
|
||||
|
||||
describe("indent Lua:", function()
|
||||
describe("whole file:", function()
|
||||
run:whole_file(".", {
|
||||
expected_failures = {},
|
||||
})
|
||||
end)
|
||||
end)
|
||||
|
||||
describe("new line:", function()
|
||||
run:new_line("module.ql", { on_line = 6, text = "predicate test() {}", indent = 2 })
|
||||
end)
|
||||
Loading…
Add table
Add a link
Reference in a new issue