mirror of
https://github.com/jimeh/go-tmux.git
synced 2026-02-19 12:56:45 +00:00
fix: Parsing of double quoted options
This commit is contained in:
27
scope_test.go
Normal file
27
scope_test.go
Normal 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))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user