fix: Parsing of double quoted options

This commit is contained in:
2019-12-09 21:46:01 +00:00
parent bb1d544f43
commit 048455a6bc
5 changed files with 46 additions and 33 deletions

27
scope_test.go Normal file
View File

@@ -0,0 +1,27 @@
package tmux
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestScopeToFlags(t *testing.T) {
tests := []struct {
scope Scope
flags string
}{
{0, ""},
{Server, "-s"},
{GlobalSession, "-g"},
{Session, ""},
{GlobalWindow, "-gw"},
{Window, "-w"},
{38404, ""},
{934, ""},
}
for _, tt := range tests {
assert.Equal(t, tt.flags, ScopeToFlags(tt.scope))
}
}