commands: add missing noTabs test

This commit is contained in:
Frank Schroeder 2017-10-17 14:07:30 +02:00 committed by Frank Schröder
parent 84a82cff3d
commit e5d08cf47d
4 changed files with 28 additions and 0 deletions

View File

@ -25,6 +25,13 @@ func argFail(t *testing.T, args []string, expected string) {
}
func TestLockCommand_noTabs(t *testing.T) {
t.Parallel()
if strings.ContainsRune(New(cli.NewMockUi()).Help(), '\t') {
t.Fatal("usage has tabs")
}
}
func TestLockCommand_BadArgs(t *testing.T) {
t.Parallel()
argFail(t, []string{"-try=blah", "test/prefix", "date"}, "invalid duration")

View File

@ -9,6 +9,13 @@ import (
"github.com/mitchellh/cli"
)
func TestMaintCommand_noTabs(t *testing.T) {
t.Parallel()
if strings.ContainsRune(New(cli.NewMockUi()).Help(), '\t') {
t.Fatal("usage has tabs")
}
}
func TestMaintCommand_ConflictingArgs(t *testing.T) {
t.Parallel()
ui := cli.NewMockUi()

View File

@ -9,6 +9,13 @@ import (
"github.com/mitchellh/cli"
)
func TestMembersCommand_noTabs(t *testing.T) {
t.Parallel()
if strings.ContainsRune(New(cli.NewMockUi()).Help(), '\t') {
t.Fatal("usage has tabs")
}
}
func TestMembersCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)

View File

@ -8,6 +8,13 @@ import (
"github.com/mitchellh/cli"
)
func TestWatchCommand_noTabs(t *testing.T) {
t.Parallel()
if strings.ContainsRune(New(cli.NewMockUi(), nil).Help(), '\t') {
t.Fatal("usage has tabs")
}
}
func TestWatchCommand(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)