Skip to content

Commit

Permalink
Split go.mod for test
Browse files Browse the repository at this point in the history
  • Loading branch information
winebarrel committed Nov 9, 2024
1 parent dd6c384 commit ae67d39
Show file tree
Hide file tree
Showing 28 changed files with 53 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ lint:

.PHONY: test
test:
go test ./...
cd test && go test -v ./...

.PHONY: clean
clean:
Expand Down
4 changes: 3 additions & 1 deletion cmd/crongrep/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/winebarrel/cronplan/cmd/crongrep

go 1.23.0
go 1.21

toolchain go1.21.1

replace github.com/winebarrel/cronplan => ../..

Expand Down
4 changes: 3 additions & 1 deletion cmd/cronmatch/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/winebarrel/cronplan/cmd/cronmatch

go 1.23.0
go 1.21

toolchain go1.21.1

replace github.com/winebarrel/cronplan => ../..

Expand Down
4 changes: 3 additions & 1 deletion cmd/cronplan/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/winebarrel/cronplan/cmd/cronplan

go 1.23.0
go 1.21

toolchain go1.21.1

replace github.com/winebarrel/cronplan => ../..

Expand Down
4 changes: 3 additions & 1 deletion cmd/cronviz/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/winebarrel/cronplan/cmd/cronviz

go 1.23.0
go 1.21

toolchain go1.21.1

replace github.com/winebarrel/cronplan => ../..

Expand Down
11 changes: 1 addition & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,4 @@ go 1.21

toolchain go1.21.1

require (
github.com/alecthomas/participle/v2 v2.1.1
github.com/stretchr/testify v1.9.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
require github.com/alecthomas/participle/v2 v2.1.1
10 changes: 0 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,5 @@ github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6i
github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c=
github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk=
github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion parse_intg_test.go → test/cronplan/parse_intg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func nwday(i int) *cronplan.NearestWeekday {
}

func lastw(i time.Weekday) *cronplan.LastDayOfWeek {
v := cronplan.LastDayOfWeek{wday(i)}
v := cronplan.LastDayOfWeek{Wday: wday(i)}
return &v
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion string_test.go → test/cronplan/string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func TestLastOfWeekToString(t *testing.T) {
assert := assert.New(t)

for w, s := range tt {
x := cronplan.LastDayOfWeek{wday(w)}
x := cronplan.LastDayOfWeek{Wday: wday(w)}
assert.Equal(s+"L", x.String())
}
}
Expand Down
19 changes: 19 additions & 0 deletions test/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module github.com/winebarrel/cronplan/test

go 1.21

toolchain go1.21.1

replace github.com/winebarrel/cronplan => ..

require (
github.com/stretchr/testify v1.9.0
github.com/winebarrel/cronplan v0.0.0-00010101000000-000000000000
)

require (
github.com/alecthomas/participle/v2 v2.1.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
18 changes: 18 additions & 0 deletions test/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0=
github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ=
github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8=
github.com/alecthomas/participle/v2 v2.1.1/go.mod h1:Y1+hAs8DHPmc3YUFzqllV+eSQ9ljPTk0ZkPMtEdAx2c=
github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk=
github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
File renamed without changes.
File renamed without changes.

0 comments on commit ae67d39

Please sign in to comment.