transpiler_test.go
1package main
2
3import (
4 "testing"
5
6 "github.com/spf13/afero"
7)
8
9func TestTranspiler(t *testing.T) {
10 fs := afero.NewBasePathFs(afero.NewOsFs(), "testdata")
11 p := NewTranspilerProvider(fs)
12
13 inv := p.Inventory()
14 if len(inv) != 1 {
15 t.Error("Wrong inventory:", inv)
16 } else if len(inv[0].Puzzles) != 2 {
17 t.Error("Wrong puzzles:", inv)
18 }
19}