Check of the content of the line

This commit is contained in:
Nino Khodabandeh 2016-04-26 16:16:15 -07:00
parent a7c1263528
commit 86ea7df4bc
1 changed files with 4 additions and 2 deletions

View File

@ -101,9 +101,11 @@ func TestStopAtEOF(t *testing.T) {
tail := tailTest.StartTail("test.txt", Config{Follow: true, Location: nil}) tail := tailTest.StartTail("test.txt", Config{Follow: true, Location: nil})
// read "hello" // read "hello"
<-tail.Lines line := <-tail.Lines
if line.Text != "hello" {
t.Errorf("Expected to get 'hello', got '%s' instead", line)
}
<-time.After(100 * time.Millisecond)
tailTest.VerifyTailOutput(tail, []string{"there", "world"}, false) tailTest.VerifyTailOutput(tail, []string{"there", "world"}, false)
tail.StopAtEOF() tail.StopAtEOF()
tailTest.Cleanup(tail, true) tailTest.Cleanup(tail, true)