aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/yaml_spec.lua
blob: 001bc01f124ca54b89e6ef3195095d25084fe650 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
local Runner = require('tests.indent.common').Runner
--local XFAIL = require("tests.indent.common").XFAIL

local run = Runner:new(it, 'tests/indent/yaml', {
  shiftwidth = 2,
  expandtab = true,
})

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

  describe('new line:', function()
    run:new_line('indent-sequence-items.yaml', { on_line = 2, text = 'key3: value3', indent = 2 })
    run:new_line('autoindent-mapping-pair.yaml', { on_line = 1, text = 'key3: value3', indent = 2 })
  end)
end)