Skip to content

Commit

Permalink
docs: fix typo using typos
Browse files Browse the repository at this point in the history
```sh
typos -w
```
  • Loading branch information
suzuki-shunsuke committed Oct 27, 2024
1 parent 94107c2 commit 83b17d4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# https://github.com/crate-ci/typos
[default.extend-words]
som = "som"
halp = "halp"
pn = "pn"
ser = "ser"
10 changes: 5 additions & 5 deletions command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3121,35 +3121,35 @@ func TestShorthandCommand(t *testing.T) {

err := cmd.Run(buildTestContext(t), []string{"foo", "cth"})
assert.NoError(t, err)
assert.True(t, cmd1 == 1 && cmd2 == 0, "Expected command1 to be trigerred once")
assert.True(t, cmd1 == 1 && cmd2 == 0, "Expected command1 to be triggered once")

cmd1 = 0
cmd2 = 0

err = cmd.Run(buildTestContext(t), []string{"foo", "cthd"})
assert.NoError(t, err)
assert.True(t, cmd1 == 1 && cmd2 == 0, "Expected command1 to be trigerred once")
assert.True(t, cmd1 == 1 && cmd2 == 0, "Expected command1 to be triggered once")

cmd1 = 0
cmd2 = 0

err = cmd.Run(buildTestContext(t), []string{"foo", "cthe"})
assert.NoError(t, err)
assert.True(t, cmd1 == 1 && cmd2 == 0, "Expected command1 to be trigerred once")
assert.True(t, cmd1 == 1 && cmd2 == 0, "Expected command1 to be triggered once")

cmd1 = 0
cmd2 = 0

err = cmd.Run(buildTestContext(t), []string{"foo", "cthert"})
assert.NoError(t, err)
assert.True(t, cmd1 == 0 && cmd2 == 1, "Expected command1 to be trigerred once")
assert.True(t, cmd1 == 0 && cmd2 == 1, "Expected command1 to be triggered once")

cmd1 = 0
cmd2 = 0

err = cmd.Run(buildTestContext(t), []string{"foo", "cthet"})
assert.NoError(t, err)
assert.True(t, cmd1 == 0 && cmd2 == 1, "Expected command1 to be trigerred once")
assert.True(t, cmd1 == 0 && cmd2 == 1, "Expected command1 to be triggered once")
}

func TestCommand_Int(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The V2 changes were all shipped in [urfave/cli/pull/892](https://github.com/urfa
### Added

- Added `NewStringSlice` and `NewIntSlice` for creating their related types
- Added `Float64SliceFlag` for unmarshaling a list of floats from the user
- Added `Float64SliceFlag` for unmarshalling a list of floats from the user
- Added `Context.Lineage` to get all contexts from current up to global
- Added `Context.LocalFlagNames` to get the flag names from *only* the current context
- Added `BoolFlag.Value` to handle both default-false and default-true
Expand Down
2 changes: 1 addition & 1 deletion flag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3100,7 +3100,7 @@ func TestNonStringMap(t *testing.T) {
assert.ErrorContains(t, f.Set("invalid=value"), "ParseFloat")
}

func TestUnqouteUsage(t *testing.T) {
func TestUnquoteUsage(t *testing.T) {
tests := []struct {
str string
expStr string
Expand Down

0 comments on commit 83b17d4

Please sign in to comment.