MCPcopy
hub / github.com/pterm/pterm / TestProgressbarPrinter_Add_With

Function TestProgressbarPrinter_Add_With

progressbar_printer_test.go:21–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19}
20
21func TestProgressbarPrinter_Add_With(t *testing.T) {
22 proxyToDevNull()
23 w := pterm.GetTerminalWidth()
24 h := pterm.GetTerminalHeight()
25 pterm.SetForcedTerminalSize(1, 1)
26 p := pterm.DefaultProgressbar.WithTotal(2000)
27 p.Add(1337)
28 testza.AssertEqual(t, 1337, p.Current)
29 p.Stop()
30 pterm.SetForcedTerminalSize(w, h)
31}
32
33func TestProgressbarPrinter_AddWithNoStyle(t *testing.T) {
34 proxyToDevNull()

Callers

nothing calls this directly

Calls 7

GetTerminalWidthFunction · 0.92
GetTerminalHeightFunction · 0.92
SetForcedTerminalSizeFunction · 0.92
proxyToDevNullFunction · 0.85
WithTotalMethod · 0.80
AddMethod · 0.45
StopMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…