MCPcopy Index your code
hub / github.com/docker/cli / TestPrintImageTreeAnsiTty

Function TestPrintImageTreeAnsiTty

cli/command/image/tree_test.go:13–158  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11)
12
13func TestPrintImageTreeAnsiTty(t *testing.T) {
14 testCases := []struct {
15 name string
16 stdinTty bool
17 stdoutTty bool
18 stderrTty bool
19 expectedAnsi bool
20 noColorEnv bool
21 }{
22 {
23 name: "non-terminal",
24 stdinTty: false,
25 stdoutTty: false,
26 stderrTty: false,
27
28 expectedAnsi: false,
29 },
30 {
31 name: "terminal",
32 stdinTty: true,
33 stdoutTty: true,
34 stderrTty: true,
35
36 expectedAnsi: true,
37 },
38 {
39 name: "stdout-tty-only",
40 stdinTty: false,
41 stdoutTty: true,
42 stderrTty: false,
43
44 expectedAnsi: true,
45 },
46 {
47 name: "stdin-stderr-tty-only",
48 stdinTty: true,
49 stdoutTty: false,
50 stderrTty: true,
51
52 expectedAnsi: false,
53 },
54 {
55 name: "stdout-stdin-tty",
56 stdinTty: true,
57 stdoutTty: true,
58 stderrTty: false,
59
60 expectedAnsi: true,
61 },
62 {
63 name: "stdout-stderr-tty",
64 stdinTty: false,
65 stdoutTty: true,
66 stderrTty: true,
67
68 expectedAnsi: true,
69 },
70 {

Callers

nothing calls this directly

Calls 8

InMethod · 0.95
OutMethod · 0.95
ErrMethod · 0.95
OutBufferMethod · 0.95
printImageTreeFunction · 0.85
ContainsMethod · 0.80
StringMethod · 0.65
SetIsTerminalMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…