github.com/fibonacci1729/draft@v0.3.0/pkg/draft/draftpath/home_unix_test.go (about) 1 package draftpath 2 3 import ( 4 "runtime" 5 "testing" 6 ) 7 8 func TestDraftHome(t *testing.T) { 9 ph := Home("/r") 10 isEq := func(t *testing.T, a, b string) { 11 if a != b { 12 t.Error(runtime.GOOS) 13 t.Errorf("Expected %q, got %q", a, b) 14 } 15 } 16 17 isEq(t, ph.String(), "/r") 18 isEq(t, ph.Packs(), "/r/packs") 19 isEq(t, ph.Plugins(), "/r/plugins") 20 }