github.com/metux/go-metabuild@v0.0.0-20240118143255-d9ed5ab697f9/util/specobj/specobj_test.go (about)

     1  package specobj
     2  
     3  import (
     4  	"testing"
     5  
     6  	magic "github.com/metux/go-magicdict"
     7  )
     8  
     9  // test whether MagicDict supports Entry interface
    10  func t1(t *testing.T, ent magic.Entry) {
    11  	t.Logf("%s", ent.Keys())
    12  }
    13  
    14  func TestSpecObj(t *testing.T) {
    15  	so, err := magic.YamlLoad("../../examples/pkg/zlib/metabuild.yaml", "../../examples/conf/settings.yaml")
    16  	if err != nil {
    17  		t.Fatalf("failed loading yaml: %s", err)
    18  	}
    19  	t1(t, so)
    20  }