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 a6d912adb4
commit a1a1a6971d
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(), ``)