Conversation
|
Byte streams are the normal output of external commands. They can be used as strings as long as they parse as UTF-8, and they can also be used as binary. Having a byte stream isn't unusual, and you might also see Since the culprit is the value of |
|
well, i can't reproduce this for now 🤔 if i add a few debug prints to the test to extract the values of diff --git a/pkgs/nu-git-manager-sugar/tests/git.nu b/pkgs/nu-git-manager-sugar/tests/git.nu
index 9057dfe..df5414e 100644
--- a/pkgs/nu-git-manager-sugar/tests/git.nu
+++ b/pkgs/nu-git-manager-sugar/tests/git.nu
@@ -356,6 +356,12 @@ export def branch-compare [] {
"\\ No newline at end of file"
"",
]
+ print "ACTUAL---"
+ print (gm repo compare main)
+ print "---END"
+ print "EXPECTED"
+ print ($expected | str join "\n")
+ print "---END"
assert equal (gm repo compare main) ($expected | str join "\n")
assert equal (gm repo compare main --head HEAD) ($expected | str join "\n")
i get let actual = 'diff --git a/foo.txt b/foo.txt
new file mode 100644
index 0000000..1910281
--- /dev/null
+++ b/foo.txt
@@ -0,0 +1 @@
+foo
\ No newline at end of file'
let expected = 'diff --git a/foo.txt b/foo.txt
new file mode 100644
index 0000000..1910281
--- /dev/null
+++ b/foo.txt
@@ -0,0 +1 @@
+foo
\ No newline at end of file
'but use std assert
assert equal $actual $expecteddoes not fail with the "span" issue ideamaybe that's because ^echo "foo" | describe # shows "byte stream"but assert equal (^echo "foo") "foo" # does not fail |
|
also, if would expect |
|
I thought the CI error was because you are running ubuntu 20.04 in CI versus ubuntu latest. |
|
@fdncred maybe you're referring to the failing CI from nushell/nupm#94? 😋 |
|
@amtoine Ya, sorry. |
|
@fdncred aha, no worries, these two CI issues are haunting my dreams 🤣 |
related to
running
tk test compare --verbosewould give the following error:it appears the
gm repo branch comparecommand outputs a "byte stream" instead of astring🤔what i don't understand:
get-committest passes withoutcollect, becausegm repo get commitalso returns a byte stream instead of astring