Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
add test cases for status -json and -dot output
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 committed May 11, 2017
1 parent 3c5cd66 commit 05893d5
Show file tree
Hide file tree
Showing 21 changed files with 130 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/dep/testdata/harness_tests/status/case1/dot/stdout.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
digraph {
node [shape=box];
388407825 [label="github.com/golang/notexist"];
2304687900 [label="github.com/sdboyer/deptest\nv0.8.0"];
2659405890 [label="github.com/sdboyer/deptestdos\nv2.0.0"];
388407825 -> 2304687900;
388407825 -> 2659405890;
2659405890 -> 2304687900;
}
10 changes: 10 additions & 0 deletions cmd/dep/testdata/harness_tests/status/case1/dot/testcase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"commands": [
["ensure"],
["status","-dot"]
],
"vendor-final": [
"github.com/sdboyer/deptest",
"github.com/sdboyer/deptestdos"
]
}
13 changes: 13 additions & 0 deletions cmd/dep/testdata/harness_tests/status/case1/json/final/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[dependencies]]
name = "github.com/sdboyer/deptest"
version = "^0.8.0"

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[dependencies]]
name = "github.com/sdboyer/deptest"
version = "^0.8.0"
18 changes: 18 additions & 0 deletions cmd/dep/testdata/harness_tests/status/case1/json/initial/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// 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/deptest"
"github.com/sdboyer/deptestdos"
)

func main() {
err := nil
if err != nil {
deptest.Map["yo yo!"]
}
deptestdos.diMeLo("whatev")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"ProjectRoot":"github.com/sdboyer/deptest","Children":null,"Constraint":{},"Version":{},"Revision":"ff2948a2ac8f538c4ecd55962e919d1e13e74baf","Latest":"3f4c3bea144e112a69bbe5d8d01c1b09a544253f","PackageCount":1},{"ProjectRoot":"github.com/sdboyer/deptestdos","Children":null,"Constraint":{},"Version":{},"Revision":"5c607206be5decd28e6263ffffdcee067266015e","Latest":"5c607206be5decd28e6263ffffdcee067266015e","PackageCount":1}]
10 changes: 10 additions & 0 deletions cmd/dep/testdata/harness_tests/status/case1/json/testcase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"commands": [
["ensure"],
["status","-json"]
],
"vendor-final": [
"github.com/sdboyer/deptest",
"github.com/sdboyer/deptestdos"
]
}
13 changes: 13 additions & 0 deletions cmd/dep/testdata/harness_tests/status/case1/table/final/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[dependencies]]
name = "github.com/sdboyer/deptest"
version = "^0.8.0"

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[dependencies]]
name = "github.com/sdboyer/deptest"
version = "^0.8.0"
18 changes: 18 additions & 0 deletions cmd/dep/testdata/harness_tests/status/case1/table/initial/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// 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/deptest"
"github.com/sdboyer/deptestdos"
)

func main() {
err := nil
if err != nil {
deptest.Map["yo yo!"]
}
deptestdos.diMeLo("whatev")
}

0 comments on commit 05893d5

Please sign in to comment.