Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
go.mod: use github.com/rogpeppe/go-internal/testscript
Browse files Browse the repository at this point in the history
github.com/rogpeppe/testscript no longer maintain.
We should be use github.com/rogpeppe/go-internal/testscript which still
maintains.
Also, fix filepath.Walk logic on doc/tutorial/basics.TestScript. Might
be related github.com/rogpeppe/go-internal upstream change.

Change-Id: I16ca3f28b9138bf0fbd4cb242ce3f74fc3d66133
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/6081
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
  • Loading branch information
zchee authored and mpvl committed Jun 2, 2020
1 parent 78cc785 commit 3e62450
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions cmd/cue/cmd/script_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"strings"
"testing"

"github.com/rogpeppe/testscript"
"github.com/rogpeppe/testscript/txtar"
"github.com/rogpeppe/go-internal/testscript"
"github.com/rogpeppe/go-internal/txtar"

"cuelang.org/go/cue/errors"
"cuelang.org/go/cue/parser"
Expand Down
8 changes: 4 additions & 4 deletions doc/tutorial/basics/script_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"
"testing"

"github.com/rogpeppe/testscript"
"github.com/rogpeppe/testscript/txtar"
"github.com/rogpeppe/go-internal/testscript"
"github.com/rogpeppe/go-internal/txtar"

"cuelang.org/go/cmd/cue/cmd"
"cuelang.org/go/cue/parser"
Expand Down Expand Up @@ -49,8 +49,8 @@ func TestLatest(t *testing.T) {

func TestScript(t *testing.T) {
filepath.Walk(".", func(path string, info os.FileInfo, err error) error {
if !info.IsDir() {
return nil
if info.IsDir() {
return filepath.SkipDir
}
testscript.Run(t, testscript.Params{
Dir: path,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/lib/pq v1.0.0 // indirect
github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de
github.com/pkg/errors v0.8.1 // indirect
github.com/rogpeppe/testscript v1.1.0
github.com/rogpeppe/go-internal v1.6.0
github.com/spf13/cobra v0.0.7
github.com/spf13/pflag v1.0.3
github.com/stretchr/testify v1.2.2
Expand Down
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de/go.mod h1:kJun4WP5gFuH
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand All @@ -91,8 +90,8 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/testscript v1.1.0 h1:NxTsoOBQ1zibxf6NDtzrjPbK56hDAteIcOTSINZHtow=
github.com/rogpeppe/testscript v1.1.0/go.mod h1:lzMlnW8LS56mcdJoQYkrlzqOoTFCOemzt5LusJ93bDM=
github.com/rogpeppe/go-internal v1.6.0 h1:IZRgg4sfrDH7nsAD1Y/Nwj+GzIfEwpJSLjCaNC3SbsI=
github.com/rogpeppe/go-internal v1.6.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
Expand Down
2 changes: 1 addition & 1 deletion internal/cuetxtar/txtar.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"cuelang.org/go/cue/errors"
"cuelang.org/go/cue/load"
"github.com/google/go-cmp/cmp"
"github.com/rogpeppe/testscript/txtar"
"github.com/rogpeppe/go-internal/txtar"
)

// A TxTarTest represents a test run that process all CUE tests in the txtar
Expand Down

0 comments on commit 3e62450

Please sign in to comment.