Skip to content

Commit

Permalink
collect the output of gm repo compare
Browse files Browse the repository at this point in the history
  • Loading branch information
amtoine committed Jul 19, 2024
1 parent 6cdfe07 commit 910b9c0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkgs/nu-git-manager-sugar/tests/git.nu
Original file line number Diff line number Diff line change
Expand Up @@ -353,18 +353,17 @@ export def branch-compare [] {
"+++ b/foo.txt",
"@@ -0,0 +1 @@",
"+foo",
"\\ No newline at end of file"
"",
"\\ No newline at end of file",
]
assert equal (gm repo compare main) ($expected | str join "\n")
assert equal (gm repo compare main --head HEAD) ($expected | str join "\n")
assert equal (gm repo compare main | collect) ($expected | str join "\n")
assert equal (gm repo compare main --head HEAD | collect) ($expected | str join "\n")

^git checkout main
"bar" | save --append foo.txt
^git add foo.txt
commit "c2"

assert equal (gm repo compare main --head foo) ($expected | str join "\n")
assert equal (gm repo compare main --head foo | collect) ($expected | str join "\n")

clean $foo
}
Expand Down

0 comments on commit 910b9c0

Please sign in to comment.