From 473bd498746fce6943f125d541dd40001e884cc6 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Mon, 28 Apr 2014 14:15:34 -0700 Subject: [PATCH] test: rewrite the confusing mismatch message --- tail_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tail_test.go b/tail_test.go index 2b97a96..ab3bfbe 100644 --- a/tail_test.go +++ b/tail_test.go @@ -402,9 +402,11 @@ func (t TailTest) VerifyTailOutput(tail *Tail, lines []string) { if tailedLine == nil { t.Fatalf("tail.Lines returned nil; not possible") } + // Note: not checking .Err as the `lines` argument is designed + // to match error strings as well. if tailedLine.Text != line { - t.Fatalf("mismatch; %s (actual) != %s (expected)", - tailedLine.Text, line) + t.Fatalf("unexpected line/err from tail: expecting ```%s```, but got ```%s```", + line, tailedLine.Text) } } line, ok := <-tail.Lines