mirror of
https://github.com/jimeh/tmux-themepack.git
synced 2026-02-19 11:16:43 +00:00
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:
25
test/version_test.go
Normal file
25
test/version_test.go
Normal 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)),
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user