github.com/SupersunnySea/draft@v0.16.0/pkg/draft/draftpath/home_unix_test.go (about)

     1  // +build !windows
     2  
     3  package draftpath
     4  
     5  import (
     6  	"runtime"
     7  	"testing"
     8  )
     9  
    10  func TestDraftHome(t *testing.T) {
    11  	ph := Home("/r")
    12  	isEq := func(t *testing.T, a, b string) {
    13  		if a != b {
    14  			t.Error(runtime.GOOS)
    15  			t.Errorf("Expected %q, got %q", a, b)
    16  		}
    17  	}
    18  
    19  	isEq(t, ph.String(), "/r")
    20  	isEq(t, ph.Packs(), "/r/packs")
    21  	isEq(t, ph.Plugins(), "/r/plugins")
    22  }