mirror of
https://github.com/spf13/cobra
synced 2024-11-24 22:57:12 +00:00
fix(i18n): test assertions and plurality
This commit is contained in:
parent
ca6ece94df
commit
64f5c4f405
1 changed files with 2 additions and 2 deletions
|
@ -823,7 +823,7 @@ func TestRequiredFlags(t *testing.T) {
|
|||
assertNoErr(t, c.MarkFlagRequired("foo2"))
|
||||
c.Flags().String("bar", "", "")
|
||||
|
||||
expected := fmt.Sprintf("required flag(s) %q, %q not set", "foo1", "foo2")
|
||||
expected := fmt.Sprintf("required flags %q, %q are not set", "foo1", "foo2")
|
||||
|
||||
_, err := executeCommand(c)
|
||||
got := err.Error()
|
||||
|
@ -850,7 +850,7 @@ func TestPersistentRequiredFlags(t *testing.T) {
|
|||
|
||||
parent.AddCommand(child)
|
||||
|
||||
expected := fmt.Sprintf("required flag(s) %q, %q, %q, %q not set", "bar1", "bar2", "foo1", "foo2")
|
||||
expected := fmt.Sprintf("required flags %q, %q, %q, %q are not set", "bar1", "bar2", "foo1", "foo2")
|
||||
|
||||
_, err := executeCommand(parent, "child")
|
||||
if err.Error() != expected {
|
||||
|
|
Loading…
Reference in a new issue