You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to reproduce an issue in one of the projects I maintain and am using cmp.Diff to show what went wrong when a test fails. The issue I'm facing now is that I can't read the output, so I'm not able to do much with the information given.
I guess my question is, what can I do with the byte output shown below and would the // +|.[0m.[38;5;252m| be the string value of what's changed?
This output seems to be working as intended. You're comparing two strings that cmp.Diff has detected contains non-printable characters. For that reason, it switched to a mode where it diffs the raw byte values.
This particular output is saying that the got has an additional string injected at some offset after 78204:
(BTW, the output you are seeing is inspired by the hexdump utility, which prints the raw hex values on the left, and the best ASCII representation on the right.)
Hey there,
I'm trying to reproduce an issue in one of the projects I maintain and am using
cmp.Diff
to show what went wrong when a test fails. The issue I'm facing now is that I can't read the output, so I'm not able to do much with the information given.I guess my question is, what can I do with the byte output shown below and would the
// +|.[0m.[38;5;252m|
be the string value of what's changed?cmp version:
github.com/google/go-cmp v0.5.9
go version:
go 1.17
Here's a link to the pull request and an example output we're comparing:
charmbracelet/glamour#249
testdata/issues/long-chinese-text.test
Thank you very much for your great project and I appreciate any guidance you're able to give :)
The text was updated successfully, but these errors were encountered: