That would have bugged me if I didn't do this.
[ssh-chat] / chat / room_test.go
index 661b0b39eb614bdaccd9bd94e007296dfabcba52..03733e90408394cbe080be59c5604e6479fb168d 100644 (file)
@@ -254,7 +254,7 @@ func expectOutput(t *testing.T, buffer []byte, expected string) {
        s := string(buffer)
        // Just check the suffix instead of jumping through hoops.
        if len(s) < len(expected) || s[len(s)-len(expected):] != expected {
-               t.Errorf("Got: %q; Expected: %q", s[len(s)-len(expected):], expected)
+               t.Errorf("Got: %q; Expected it to end with: %q", s, expected)
        }
 }