MCPcopy Create free account
hub / github.com/dropbox/dbxcli / TestRenderUnsupportedFormat

Function TestRenderUnsupportedFormat

internal/output/output_test.go:106–118  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

104}
105
106func TestRenderUnsupportedFormat(t *testing.T) {
107 out := New(nil, nil, Format("yaml"))
108
109 err := out.Render(func(w io.Writer) error {
110 return nil
111 }, nil)
112 if err == nil {
113 t.Fatal("expected error for unsupported output format")
114 }
115 if !strings.Contains(err.Error(), "unsupported output format") {
116 t.Fatalf("error = %q, want unsupported output format", err.Error())
117 }
118}

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
FormatTypeAlias · 0.85
RenderMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected