MCPcopy
hub / github.com/pterm/pterm / TestAreaPrinter_RemoveWhenDone

Function TestAreaPrinter_RemoveWhenDone

area_printer_test.go:53–63  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

51}
52
53func TestAreaPrinter_RemoveWhenDone(t *testing.T) {
54 originalStdout := os.Stdout
55 os.Stdout = os.NewFile(0, os.DevNull) // Set os.Stdout to DevNull to hide output from cursor.Area
56
57 a, _ := pterm.DefaultArea.WithRemoveWhenDone().Start()
58
59 a.Update("asd")
60 a.Stop()
61
62 os.Stdout = originalStdout // Restore original os.Stdout
63}
64
65func TestAreaPrinter_CenterFullscreen(t *testing.T) {
66 originalStdout := os.Stdout

Callers

nothing calls this directly

Calls 4

UpdateMethod · 0.80
StartMethod · 0.45
WithRemoveWhenDoneMethod · 0.45
StopMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…