mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-19 00:31:02 -04:00
25 lines
405 B
Go
25 lines
405 B
Go
|
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)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func TestGetShortcutString(t *testing.T) {
|
||
|
shortcut := GetShortcutString()
|
||
|
if shortcut == "" {
|
||
|
t.Fatal("returned shortcut string is empty")
|
||
|
}
|
||
|
}
|