aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/go_spec.lua
blob: 10e9763c915abf09ded04fd461a0c734b238a97d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
local Runner = require("tests.indent.common").Runner
--local XFAIL = require("tests.indent.common").XFAIL

local run = Runner:new(it, "tests/indent/go", {
  tabstop = 4,
  shiftwidth = 4,
  softtabstop = 4,
  expandtab = false,
})

describe("indent Go:", function()
  describe("whole file:", function()
    run:whole_file(".", {
      expected_failures = {},
    })
  end)

  describe("new line:", function()
    run:new_line("issue-2369.go", { on_line = 13, text = "// some comment", indent = 1 })
  end)

  describe("new line after )/}:", function()
    run:new_line("issue-2369-newline.go", { on_line = 8, text = "// comment", indent = 0 })
  end)
end)