mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-13 14:34:06 -08:00
24 lines
467 B
Go
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)
|
|
}
|