mirror of
https://github.com/grdl/git-get.git
synced 2026-02-08 16:19:19 +00:00
Add output flag and simple tree option
This commit is contained in:
@@ -96,9 +96,9 @@ gitlab.com/
|
||||
repos = append(repos, git.NewRepo(nil, path)) //&Repo{path: path})
|
||||
}
|
||||
|
||||
tree := BuildTree("root", repos)
|
||||
printer := SmartTreePrinter{}
|
||||
// Leading and trailing newlines are added to test cases for readability. We also need to add them to the rendering result.
|
||||
got := fmt.Sprintf("\n%s\n", RenderSmartTree(tree))
|
||||
got := fmt.Sprintf("\n%s\n", printer.Print("root", repos))
|
||||
|
||||
// Rendered tree uses spaces for indentation but the test cases use tabs.
|
||||
if got != strings.ReplaceAll(test.want, "\t", " ") {
|
||||
|
||||
Reference in New Issue
Block a user