Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Jul 16, 2024
1 parent 37a7f84 commit 580722c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestCommand(t *testing.T) {
Expect(carapace.ActionStyledValuesDescribed(
"--string", "string flag", style.Blue,
).NoSpace('.').
Tag("flags"))
Tag("longhand flags"))

s.Run("parsing", "interspersed", "--bool", "p1", "--string", "").
Expect(carapace.ActionValues(
Expand All @@ -80,39 +80,39 @@ func TestCommand(t *testing.T) {
"--bool", "bool flag", style.Default,
"--string", "string flag", style.Blue,
).NoSpace('.').
Tag("flags"))
Tag("longhand flags"))

s.Run("persistentflags", "--").
Expect(carapace.ActionStyledValuesDescribed(
"--bool", "bool flag", style.Default,
"--string", "string flag", style.Blue,
).NoSpace('.').
Tag("flags"))
Tag("longhand flags"))

s.Run("persistentflags", "subcommand", "--").
Expect(carapace.ActionStyledValuesDescribed(
"--bool", "bool flag", style.Default,
"--string", "string flag", style.Blue,
).NoSpace('.').
Tag("flags"))
Tag("longhand flags"))

s.Run("persistentflags", "--bool", "subcommand", "--").
Expect(carapace.ActionStyledValuesDescribed(
"--string", "string flag", style.Blue,
).NoSpace('.').
Tag("flags"))
Tag("longhand flags"))

s.Run("exclusiveflags", "--").
Expect(carapace.ActionStyledValuesDescribed(
"--bool", "bool flag", style.Default,
"--string", "string flag", style.Blue,
).NoSpace('.').
Tag("flags"))
Tag("longhand flags"))

s.Run("exclusiveflags", "--bool", "--").
Expect(carapace.ActionValues().
NoSpace('.').
Tag("flags"))
Tag("longhand flags"))

s.Run("run", "shell", "--color=").
Expect(carapace.ActionValues(
Expand Down
2 changes: 1 addition & 1 deletion flag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,6 @@ func TestFlag(t *testing.T) {
Expect(carapace.ActionValuesDescribed(
"--repeatable", "repeatable",
).NoSpace('.').
Tag("flags"))
Tag("longhand flags"))
})
}
4 changes: 2 additions & 2 deletions spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ func TestNonposix(t *testing.T) {
"-styled", "nonposix shorthand").
NoSpace('.').
Style(style.Carapace.FlagArg).
Tag("flags"))
Tag("shorthand flags"))

s.Run("--m").
Expect(carapace.ActionValuesDescribed(
"--mixed", "mixed repeatable",
).NoSpace('.').
Style(style.Carapace.FlagNoArg).
Tag("flags"))
Tag("longhand flags"))

s.Run("-opt=").
Expect(carapace.ActionValues(
Expand Down

0 comments on commit 580722c

Please sign in to comment.