Skip to content

Commit

Permalink
Merge pull request #5 from codecrafters-io/Update-dependencies-to-lat…
Browse files Browse the repository at this point in the history
…est-versions

CC-1067 update tester-utils to v0.2.15
  • Loading branch information
libmartinito authored Mar 7, 2024
2 parents ecd403c + ccff982 commit b64aaa2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/codecrafters-io/grep-tester

go 1.20

require github.com/codecrafters-io/tester-utils v0.2.10
require github.com/codecrafters-io/tester-utils v0.2.15

require (
github.com/davecgh/go-spew v1.1.1 // indirect
Expand All @@ -12,7 +12,7 @@ require (
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.8.4 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/sys v0.18.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ github.com/codecrafters-io/tester-utils v0.2.1 h1:+bdZLJhFMWcf+/E3C4NlGsIvxvsyBW
github.com/codecrafters-io/tester-utils v0.2.1/go.mod h1:BeSLyqBpFxUwIm41QlnuRG7ZsabBXWE2Ga3LMFUXAPM=
github.com/codecrafters-io/tester-utils v0.2.10 h1:Xpu6wzgpRpiZPFNGWMRcJXwAZZ0Yb5Mv6IDOR319f+s=
github.com/codecrafters-io/tester-utils v0.2.10/go.mod h1:BeSLyqBpFxUwIm41QlnuRG7ZsabBXWE2Ga3LMFUXAPM=
github.com/codecrafters-io/tester-utils v0.2.15 h1:d6lbr1nVkZ4+G55E47bG3bf1lWiMLOUZy5EiHwX2SsE=
github.com/codecrafters-io/tester-utils v0.2.15/go.mod h1:BeSLyqBpFxUwIm41QlnuRG7ZsabBXWE2Ga3LMFUXAPM=
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/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
Expand All @@ -27,6 +29,8 @@ golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
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.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
Expand Down
4 changes: 2 additions & 2 deletions internal/stage_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package internal
import (
"fmt"

tester_utils "github.com/codecrafters-io/tester-utils"
"github.com/codecrafters-io/tester-utils/test_case_harness"
)

// Example from the grep course
func testInit(stageHarness *tester_utils.StageHarness) error {
func testInit(stageHarness *test_case_harness.TestCaseHarness) error {
// should exit with 0: echo "dog" | grep -E "d"
stageHarness.Logger.Infof("$ echo \"%s\" | ./script.sh -E \"%s\"", "dog", "d")

Expand Down
12 changes: 6 additions & 6 deletions internal/tester_definition.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package internal

import (
testerutils "github.com/codecrafters-io/tester-utils"
"github.com/codecrafters-io/tester-utils/tester_definition"
)

var testerDefinition = testerutils.TesterDefinition{
AntiCheatTestCases: []testerutils.TestCase{},
var testerDefinition = tester_definition.TesterDefinition{
AntiCheatTestCases: []tester_definition.TestCase{},
ExecutableFileName: "script.sh",
TestCases: []testerutils.TestCase{
TestCases: []tester_definition.TestCase{
{
Slug: "init",
TestFunc: testInit,
Slug: "init",
TestFunc: testInit,
},
},
}

0 comments on commit b64aaa2

Please sign in to comment.