diff --git a/cmd/dep/status.go b/cmd/dep/status.go index 0c39040366..49ef9e9fec 100644 --- a/cmd/dep/status.go +++ b/cmd/dep/status.go @@ -96,7 +96,7 @@ func (out *tableOutput) BasicLine(bs *BasicStatus) { constraint = bs.Constraint.String() } if bs.hasOverride { - constraint += "(override)" + constraint += " (override)" } fmt.Fprintf(out.w, "%s\t%s\t%s\t%s\t%s\t%d\t\n", diff --git a/cmd/dep/testdata/harness_tests/status/override_constraint/final/Gopkg.lock b/cmd/dep/testdata/harness_tests/status/override_constraint/final/Gopkg.lock new file mode 100644 index 0000000000..f987a57915 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/status/override_constraint/final/Gopkg.lock @@ -0,0 +1,21 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/sdboyer/deptest" + packages = ["."] + revision = "3f4c3bea144e112a69bbe5d8d01c1b09a544253f" + version = "v0.8.1" + +[[projects]] + name = "github.com/sdboyer/deptestdos" + packages = ["."] + revision = "5c607206be5decd28e6263ffffdcee067266015e" + version = "v2.0.0" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "1c4444f47ab5d5c484634d1a0c95d99beb879a37337bc0d7aecbd97cf79b6cb1" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/status/override_constraint/final/Gopkg.toml b/cmd/dep/testdata/harness_tests/status/override_constraint/final/Gopkg.toml new file mode 100644 index 0000000000..a612225457 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/status/override_constraint/final/Gopkg.toml @@ -0,0 +1,3 @@ +[[override]] + name = "github.com/sdboyer/deptest" + version = "=0.8.1" diff --git a/cmd/dep/testdata/harness_tests/status/override_constraint/initial/Gopkg.lock b/cmd/dep/testdata/harness_tests/status/override_constraint/initial/Gopkg.lock new file mode 100644 index 0000000000..f987a57915 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/status/override_constraint/initial/Gopkg.lock @@ -0,0 +1,21 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/sdboyer/deptest" + packages = ["."] + revision = "3f4c3bea144e112a69bbe5d8d01c1b09a544253f" + version = "v0.8.1" + +[[projects]] + name = "github.com/sdboyer/deptestdos" + packages = ["."] + revision = "5c607206be5decd28e6263ffffdcee067266015e" + version = "v2.0.0" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "1c4444f47ab5d5c484634d1a0c95d99beb879a37337bc0d7aecbd97cf79b6cb1" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/cmd/dep/testdata/harness_tests/status/override_constraint/initial/Gopkg.toml b/cmd/dep/testdata/harness_tests/status/override_constraint/initial/Gopkg.toml new file mode 100644 index 0000000000..a612225457 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/status/override_constraint/initial/Gopkg.toml @@ -0,0 +1,3 @@ +[[override]] + name = "github.com/sdboyer/deptest" + version = "=0.8.1" diff --git a/cmd/dep/testdata/harness_tests/status/override_constraint/initial/main.go b/cmd/dep/testdata/harness_tests/status/override_constraint/initial/main.go new file mode 100644 index 0000000000..6ebfee7840 --- /dev/null +++ b/cmd/dep/testdata/harness_tests/status/override_constraint/initial/main.go @@ -0,0 +1,12 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + _ "github.com/sdboyer/deptestdos" +) + +func main() { +} diff --git a/cmd/dep/testdata/harness_tests/status/override_constraint/stdout.txt b/cmd/dep/testdata/harness_tests/status/override_constraint/stdout.txt new file mode 100644 index 0000000000..e3df72b63d --- /dev/null +++ b/cmd/dep/testdata/harness_tests/status/override_constraint/stdout.txt @@ -0,0 +1,3 @@ +PROJECT CONSTRAINT VERSION REVISION LATEST PKGS USED +github.com/sdboyer/deptest * (override) v0.8.1 3f4c3be ff2948a 1 +github.com/sdboyer/deptestdos * v2.0.0 5c60720 5c60720 1 diff --git a/cmd/dep/testdata/harness_tests/status/override_constraint/testcase.json b/cmd/dep/testdata/harness_tests/status/override_constraint/testcase.json new file mode 100644 index 0000000000..e1f1eadeeb --- /dev/null +++ b/cmd/dep/testdata/harness_tests/status/override_constraint/testcase.json @@ -0,0 +1,11 @@ +{ + "commands": [ + ["ensure"], + ["status"] + ], + "error-expected": "", + "vendor-final": [ + "github.com/sdboyer/deptest", + "github.com/sdboyer/deptestdos" + ] +}