github.com/rumpl/bof@v23.0.0-rc.2+incompatible/pkg/homedir/homedir_test.go (about)

     1  package homedir // import "github.com/docker/docker/pkg/homedir"
     2  
     3  import (
     4  	"path/filepath"
     5  	"testing"
     6  )
     7  
     8  func TestGet(t *testing.T) {
     9  	home := Get()
    10  	if home == "" {
    11  		t.Fatal("returned home directory is empty")
    12  	}
    13  
    14  	if !filepath.IsAbs(home) {
    15  		t.Fatalf("returned path is not absolute: %s", home)
    16  	}
    17  }
    18  
    19  func TestGetShortcutString(t *testing.T) {
    20  	shortcut := GetShortcutString()
    21  	if shortcut == "" {
    22  		t.Fatal("returned shortcut string is empty")
    23  	}
    24  }