moth/cmd/mothd/transpiler_test.go

20 lines
344 B
Go
Raw Permalink Normal View History

2020-09-08 17:49:02 -06:00
package main
import (
"testing"
"github.com/spf13/afero"
)
func TestTranspiler(t *testing.T) {
fs := afero.NewBasePathFs(afero.NewOsFs(), "testdata")
p := NewTranspilerProvider(fs)
inv := p.Inventory()
if len(inv) != 1 {
t.Error("Wrong inventory:", inv)
} else if len(inv[0].Puzzles) != 1 {
t.Error("Wrong inventory:", inv)
}
}