add ql indent tests

This commit is contained in:
Alvaro Muñoz 2023-01-31 10:47:48 +01:00 committed by Stephan Seitz
parent 1c41d6f825
commit 9d6d348418
3 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,9 @@
import go
module Test {
class Foo extends Type {
Foo() { this.getName() = "Foo" }
}
}
select 1

View 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
View 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)