Files
2026-07-13 13:12:56 +08:00

32 lines
436 B
Go

package main
import (
"testing"
"github.com/alecthomas/kong"
)
func TestConfig(t *testing.T) {
dir := "configurations"
entries, err := configs.ReadDir(dir)
if err != nil {
t.Fatal(err)
}
if len(entries) != 2 {
t.Fatal(entries)
}
for _, entry := range entries {
f, err := configs.Open(dir + "/" + entry.Name())
if err != nil {
t.Fatal(err)
}
_, err = kong.JSON(f)
if err != nil {
t.Fatal(err)
}
}
}