Skip to content

Commit 29b4c8c

Browse files
committed
Fix formatting issues
1 parent 58550b5 commit 29b4c8c

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

lua/cmake-tools/config.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function Config:new(const)
4949

5050
obj.executor = const.cmake_executor
5151
obj.runner = const.cmake_runner
52-
for _,v in pairs(const.ctest_extra_args) do
52+
for _, v in pairs(const.ctest_extra_args) do
5353
table.insert(obj.ctest.extra_args, v)
5454
end
5555
return obj

tests/config_spec.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
local const = require("cmake-tools.const")
22

3-
describe('Config', function()
3+
describe("Config", function()
44
local Config
55
local local_const
66

77
before_each(function()
8-
package.loaded['cmake-tools.config'] = nil
9-
Config = require('cmake-tools.config')
8+
package.loaded["cmake-tools.config"] = nil
9+
Config = require("cmake-tools.config")
1010
local_const = vim.deepcopy(const)
1111
end)
1212

13-
it('should parse user provided ctest arguments', function()
13+
it("should parse user provided ctest arguments", function()
1414
local_const.ctest_extra_args = { "-j", "6" }
1515
local config = Config:new(local_const)
1616
assert.are_same({ "-j", "6" }, config.ctest.extra_args)
1717
end)
1818

19-
it('should parse user ctest empty arguments', function()
19+
it("should parse user ctest empty arguments", function()
2020
local config = Config:new(const)
2121
assert.are_same({}, config.ctest.extra_args)
2222
end)

tests/ctest_spec.lua

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
local match = require('luassert.match')
2-
local stub = require('luassert.stub')
3-
local const = require('cmake-tools.const')
1+
local match = require("luassert.match")
2+
local stub = require("luassert.stub")
3+
local const = require("cmake-tools.const")
44
local ctest = require("cmake-tools.test.ctest")
5-
local utils = require('cmake-tools.utils')
5+
local utils = require("cmake-tools.utils")
66

77
describe("run", function()
88
local local_const
99
local Config
1010
local expected
1111
before_each(function()
12-
package.loaded['cmake-tools.config'] = nil
13-
Config = require('cmake-tools.config')
12+
package.loaded["cmake-tools.config"] = nil
13+
Config = require("cmake-tools.config")
1414
local_const = vim.deepcopy(const)
1515
expected = { "--test-dir", "build_dir", "-R", "test_name" }
1616
stub(utils, "run")
@@ -22,14 +22,16 @@ describe("run", function()
2222
ctest:run("test_name", "build_dir", "env", config, {})
2323
table.insert(expected, "-j")
2424
table.insert(expected, "6")
25-
assert.stub(utils.run).was.called_with(match._, match._, match._, expected,
26-
match._, match._, match._, match._)
25+
assert
26+
.stub(utils.run).was
27+
.called_with(match._, match._, match._, expected, match._, match._, match._, match._)
2728
end)
2829

2930
it("ignores extra args if not provided", function()
3031
local config = Config:new(const)
3132
ctest:run("test_name", "build_dir", "env", config, {})
32-
assert.stub(utils.run).was.called_with(match._, match._, match._, expected,
33-
match._, match._, match._, match._)
33+
assert
34+
.stub(utils.run).was
35+
.called_with(match._, match._, match._, expected, match._, match._, match._, match._)
3436
end)
3537
end)

0 commit comments

Comments
 (0)