-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Branislav Milojkovic
authored and
Branislav Milojkovic
committed
Jul 27, 2024
1 parent
fc25fb8
commit 0818b7c
Showing
2 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package main | ||
|
||
import "testing" | ||
|
||
func TestGnoDepGraph(t *testing.T) { | ||
tc := []testMainCase{ | ||
{ | ||
// lacking input | ||
args: []string{"depgraph"}, | ||
errShouldBe: "flag: help requested", | ||
}, | ||
{ | ||
// input is not a package | ||
args: []string{"depgraph", "supercalifragilisticexpialidocious"}, | ||
errShouldContain: "error in parsing gno.mod", | ||
}, | ||
{ | ||
// given input where some requires are missing | ||
|
||
args: []string{"depgraph", "../../../examples/gno.land/p/"}, | ||
errShouldContain: "error in building graph", | ||
}, | ||
} | ||
testMainCaseRun(t, tc) | ||
} |