MCPcopy Create free account
hub / github.com/checkmake/checkmake / TestSimpleConfig

Function TestSimpleConfig

config/config_test.go:12–21  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestSimpleConfig(t *testing.T) {
13 cfg, err := NewConfigFromFile("../fixtures/exampleConfig.ini")
14
15 require.Equal(t, nil, err, "Parsing of the fixture config file should have worked.")
16
17 ruleCfg := cfg.GetRuleConfig("phonydeclared")
18
19 assert.Equal(t, "true", ruleCfg["disabled"])
20 assert.Equal(t, "bla", ruleCfg["foo"])
21}
22
23func TestFailConfig(t *testing.T) {
24 cfg, err := NewConfigFromFile("../fixtures/idontexist.ini")

Callers

nothing calls this directly

Calls 2

NewConfigFromFileFunction · 0.85
GetRuleConfigMethod · 0.80

Tested by

no test coverage detected