(t *testing.T)
| 122 | } |
| 123 | |
| 124 | func TestOver4096ByteLine(t *testing.T) { |
| 125 | tailTest := NewTailTest("Over4096ByteLine", t) |
| 126 | testString := strings.Repeat("a", 4097) |
| 127 | tailTest.CreateFile("test.txt", "test\n"+testString+"\nhello\nworld\n") |
| 128 | tail := tailTest.StartTail("test.txt", Config{Follow: true, Location: nil}) |
| 129 | go tailTest.VerifyTailOutput(tail, []string{"test", testString, "hello", "world"}, false) |
| 130 | |
| 131 | // Delete after a reasonable delay, to give tail sufficient time |
| 132 | // to read all lines. |
| 133 | <-time.After(100 * time.Millisecond) |
| 134 | tailTest.RemoveFile("test.txt") |
| 135 | tailTest.Cleanup(tail, true) |
| 136 | } |
| 137 | func TestOver4096ByteLineWithSetMaxLineSize(t *testing.T) { |
| 138 | tailTest := NewTailTest("Over4096ByteLineMaxLineSize", t) |
| 139 | testString := strings.Repeat("a", 4097) |
nothing calls this directly
no test coverage detected
searching dependent graphs…