oh-my-posh/environment_test.go
2020-09-12 08:57:18 +02:00

24 lines
467 B
Go

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)
}