diff --git a/cmd/carapace/cmd/invoke_test.go b/cmd/carapace/cmd/invoke_test.go new file mode 100644 index 0000000000..ea2141451d --- /dev/null +++ b/cmd/carapace/cmd/invoke_test.go @@ -0,0 +1,20 @@ +package cmd + +import ( + "testing" + + "github.com/rsteube/carapace" + "github.com/rsteube/carapace/pkg/sandbox" + "github.com/rsteube/carapace/pkg/style" +) + +func TestShorthandChain(t *testing.T) { + sandbox.Package(t, "github.com/rsteube/carapace-bin/cmd/carapace")(func(s *sandbox.Sandbox) { + s.Run("tail", "export", "tail", "--fo"). + Expect(carapace.ActionStyledValuesDescribed( + "--follow", "output appended data as the file grows", style.Yellow, + ).Tag("flags"). + NoSpace('.'). + Usage("carapace [flags] [COMPLETER] [bash|elvish|fish|nushell|oil|powershell|tcsh|xonsh|zsh]")) + }) +}