2015-02-06 10:18:49 -08:00
|
|
|
package homedir
|
|
|
|
|
|
|
|
import (
|
|
|
|
"path/filepath"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestGet(t *testing.T) {
|
|
|
|
home := Get()
|
|
|
|
if home == "" {
|
|
|
|
t.Fatal("returned home directory is empty")
|
|
|
|
}
|
|
|
|
|
|
|
|
if !filepath.IsAbs(home) {
|
|
|
|
t.Fatalf("returned path is not absolute: %s", home)
|
|
|
|
}
|
|
|
|
}
|
2015-02-18 22:53:04 -08:00
|
|
|
|
|
|
|
func TestGetShortcutString(t *testing.T) {
|
|
|
|
shortcut := GetShortcutString()
|
|
|
|
if shortcut == "" {
|
|
|
|
t.Fatal("returned shortcut string is empty")
|
|
|
|
}
|
|
|
|
}
|