feat(test): Add unit tests for all themes

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.
This commit is contained in:
2019-11-29 02:47:36 +00:00
parent cae4b67003
commit 6e2e24e0f2
10 changed files with 499 additions and 0 deletions

25
test/version_test.go Normal file
View File

@@ -0,0 +1,25 @@
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)),
)
}
}