oh-my-posh/segment_shell_test.go

20 lines
332 B
Go
Raw Normal View History

2020-09-15 04:44:53 -07:00
package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestWriteCurrentShell(t *testing.T) {
expected := "zsh"
env := new(MockedEnvironment)
2020-09-24 10:11:56 -07:00
env.On("getShellName", nil).Return(expected, nil)
2020-09-15 04:44:53 -07:00
props := &properties{}
s := &shell{
env: env,
props: props,
}
2020-09-20 10:13:37 -07:00
assert.Equal(t, expected, s.string())
}