From b06c316ee058ef9fdcb0011b989f4a35310416c4 Mon Sep 17 00:00:00 2001 From: JanHoefelmeyer Date: Mon, 25 Sep 2023 11:15:01 +0200 Subject: [PATCH] Add minimum documentation to some functions --- internal/options/options_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/options/options_test.go b/internal/options/options_test.go index c62c4db..0758b77 100644 --- a/internal/options/options_test.go +++ b/internal/options/options_test.go @@ -63,9 +63,10 @@ func TestParse(t *testing.T) { if _, _, err := p.Parse(); err == nil { t.Errorf("Failure: Invalid path expanded.") } - // fmt.Println(p.Parse()) } +// TestFindConfigFile tests if findConfigFile() correctly finds existing and +// doesn't find nonexisting config files func TestFindConfigFile(t *testing.T) { locations := []string{"data/config.toml"} notLocation := []string{"notomllocation"} @@ -83,6 +84,7 @@ func TestFindConfigFile(t *testing.T) { } } +// TestLoadToml tests if loadTOML() can correctly load TOML files func TestLoadToml(t *testing.T) { var cfg config if err := loadTOML(&cfg, "data/nonexistant.toml"); err.Error() != "open "+