oh-my-posh/environment_test.go

24 lines
467 B
Go
Raw Normal View History

2019-03-13 04:14:30 -07:00
package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestNormalHostName(t *testing.T) {
hostName := "hello"
assert.Equal(t, hostName, cleanHostName(hostName))
}
func TestHostNameWithLocal(t *testing.T) {
hostName := "hello.local"
assert.Equal(t, "hello", cleanHostName(hostName))
}
func TestHostNameWithLan(t *testing.T) {
hostName := "hello.lan"
cleanHostName := cleanHostName(hostName)
assert.Equal(t, "hello", cleanHostName)
}