MCPcopy Create free account
hub / github.com/hpcloud/tail / TestOver4096ByteLine

Function TestOver4096ByteLine

tail_test.go:124–136  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

122}
123
124func 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}
137func TestOver4096ByteLineWithSetMaxLineSize(t *testing.T) {
138 tailTest := NewTailTest("Over4096ByteLineMaxLineSize", t)
139 testString := strings.Repeat("a", 4097)

Callers

nothing calls this directly

Calls 6

CreateFileMethod · 0.95
StartTailMethod · 0.95
VerifyTailOutputMethod · 0.95
RemoveFileMethod · 0.95
CleanupMethod · 0.95
NewTailTestFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…