mirror of
https://github.com/jimeh/tmux-themepack.git
synced 2026-02-19 11:16:43 +00:00
Use Tmux itself by spinning up a temporary test server, load the theme, and use "show-options" to pull out and validate relevant options that are set by the theme.
26 lines
364 B
Go
26 lines
364 B
Go
package test
|
|
|
|
import (
|
|
"bytes"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestTmuxVersion(t *testing.T) {
|
|
tmuxSetup()
|
|
defer tmuxTearDown()
|
|
|
|
if tmuxVersion != "" {
|
|
out, err := tm.Exec("-V")
|
|
require.NoError(t, err)
|
|
|
|
assert.Equal(
|
|
t,
|
|
"tmux "+tmuxVersion,
|
|
string(bytes.TrimSpace(out)),
|
|
)
|
|
}
|
|
}
|