If the example tested string contains a trailing space before a newline, the test always fails no matter how.
The doc says "The comparison ignores leading and trailing space." I guess what's going on here is that it cut the trailing space in the desired output, but doesn't handle the space in the practical output if it's before a newline. Because the practical output may come from a 3rd party library, we have to respect how they print things.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/c24ffdb6-bde2-43be-b2ed-9735752bfb95n%40googlegroups.com.