(t *testing.T)
| 354 | } |
| 355 | |
| 356 | func TestConfigOpen(t *testing.T) { |
| 357 | // t.Skip("prints usage string") |
| 358 | opts := DefaultOptions("Test") |
| 359 | opts.IncludePaths = []string{".", "testdata"} |
| 360 | opts.NeedConfigFile = true |
| 361 | cfg := &TestConfig{} |
| 362 | _, err := config(opts, cfg) |
| 363 | if err == nil { |
| 364 | t.Errorf("should have Config error") |
| 365 | // } else { |
| 366 | // fmt.Println(err) |
| 367 | } |
| 368 | opts.DefaultFiles = []string{"aldfkj.toml"} |
| 369 | _, err = config(opts, cfg) |
| 370 | if err == nil { |
| 371 | t.Errorf("should have Config error") |
| 372 | // } else { |
| 373 | // fmt.Println(err) |
| 374 | } |
| 375 | opts.DefaultFiles = []string{"aldfkj.toml", "testcfg.toml"} |
| 376 | _, err = config(opts, cfg) |
| 377 | if err != nil { |
| 378 | t.Error(err) |
| 379 | } |
| 380 | } |
nothing calls this directly
no test coverage detected