MCPcopy
hub / github.com/git-lfs/git-lfs / TestSimpleTaskLogfLogsFormattedUpdates

Function TestSimpleTaskLogfLogsFormattedUpdates

tasklog/simple_task_test.go:29–46  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

27}
28
29func TestSimpleTaskLogfLogsFormattedUpdates(t *testing.T) {
30 task := NewSimpleTask()
31
32 var updates []*Update
33
34 go func() {
35 for update := range task.Updates() {
36 updates = append(updates, update)
37 }
38 task.OnComplete()
39 }()
40
41 task.Logf("Hello, world (%d)", 3+4)
42 task.Complete()
43
44 require.Len(t, updates, 1)
45 assert.Equal(t, "Hello, world (7)", updates[0].S)
46}
47
48func TestSimpleTaskCompleteClosesUpdates(t *testing.T) {
49 task := NewSimpleTask()

Callers

nothing calls this directly

Calls 7

UpdatesMethod · 0.95
OnCompleteMethod · 0.95
LogfMethod · 0.95
CompleteMethod · 0.95
NewSimpleTaskFunction · 0.85
LenMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected