Skip to content

Commit ae5a7a1

Browse files
author
Tom Fleet
committed
Update snapshot
1 parent 1530762 commit ae5a7a1

4 files changed

Lines changed: 27 additions & 15 deletions

File tree

go.mod

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ module github.com/FollowTheProcess/cli
33
go 1.23
44

55
require (
6-
github.com/FollowTheProcess/snapshot v0.1.0
7-
github.com/FollowTheProcess/test v0.18.0
6+
github.com/FollowTheProcess/snapshot v0.3.0
7+
github.com/FollowTheProcess/test v0.19.1
88
)
99

10-
require github.com/google/go-cmp v0.6.0 // indirect
10+
require (
11+
github.com/fatih/color v1.18.0 // indirect
12+
github.com/mattn/go-colorable v0.1.14 // indirect
13+
github.com/mattn/go-isatty v0.0.20 // indirect
14+
golang.org/x/sys v0.29.0 // indirect
15+
)

go.sum

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
github.com/FollowTheProcess/snapshot v0.1.0 h1:G5tWpBXVre6cTrmN1OWZLiTnqEi9IKLiewtQQYOnQqc=
2-
github.com/FollowTheProcess/snapshot v0.1.0/go.mod h1:sJv2oq83QK5Yj6+JVts8fQIaAJjQfsxN/WtGqX8oKIg=
3-
github.com/FollowTheProcess/test v0.18.0 h1:uEhAtTfSr2cOBQKUvtsNdRIlw5cJDMO08fnNKNXPzB0=
4-
github.com/FollowTheProcess/test v0.18.0/go.mod h1:zG9Lr2UaeraA/KaeCLqFbmvvhmz+lDXI8LuqDOACbFM=
5-
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
6-
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
7-
golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8=
8-
golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw=
1+
github.com/FollowTheProcess/snapshot v0.3.0 h1:LpTQCtuT0dTeWi2HhmHgHu17TtZlRPMBGtOzlQfh9HY=
2+
github.com/FollowTheProcess/snapshot v0.3.0/go.mod h1:ADH1yxxSZgDhTH5hUe+g0gB+ZQ/TGELfPHTw853qJjw=
3+
github.com/FollowTheProcess/test v0.19.1 h1:F43YTgl+shq6gdGFyliozOjunUqL7dIZa9Bp5i+/0ww=
4+
github.com/FollowTheProcess/test v0.19.1/go.mod h1:lRQGHFDEY+V2bnJkKktAE088s7L8L1qdNjZexqWInXI=
5+
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
6+
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
7+
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
8+
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
9+
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
10+
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
11+
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
12+
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
13+
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
14+
golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE=
15+
golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588=

internal/flag/flag_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ func TestFlagValue(t *testing.T) {
528528

529529
err = ipFlag.Set("192.0.2.1")
530530
test.Ok(t, err)
531-
test.Diff(t, ipFlag.Get(), net.ParseIP("192.0.2.1"))
531+
test.DiffBytes(t, ipFlag.Get(), net.ParseIP("192.0.2.1"))
532532
test.Equal(t, ipFlag.Type(), "ip")
533533
test.Equal(t, ipFlag.String(), "192.0.2.1")
534534
})

internal/flag/set_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"slices"
77
"testing"
88

9+
"github.com/FollowTheProcess/cli/internal/colour"
910
"github.com/FollowTheProcess/cli/internal/flag"
1011
"github.com/FollowTheProcess/snapshot"
1112
"github.com/FollowTheProcess/test"
@@ -1401,12 +1402,11 @@ func TestUsage(t *testing.T) {
14011402

14021403
for _, tt := range tests {
14031404
t.Run(tt.name, func(t *testing.T) {
1404-
// Force no colour in tests
1405-
t.Setenv("NO_COLOR", "true")
1406-
14071405
snap := snapshot.New(t, snapshot.Update(*update))
14081406
set := tt.newSet(t)
14091407

1408+
colour.Disable = true // For testing
1409+
14101410
got, err := set.Usage()
14111411
test.Ok(t, err)
14121412

0 commit comments

Comments
 (0)