MCPcopy Create free account
hub / github.com/cli/cli / TestFormat

Function TestFormat

pkg/cmd/version/version_test.go:7–12  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

5)
6
7func TestFormat(t *testing.T) {
8 expects := "gh version 1.4.0 (2020-12-15)\nhttps://github.com/cli/cli/releases/tag/v1.4.0\n"
9 if got := format("1.4.0", "2020-12-15", false); got != expects {
10 t.Errorf("format() = %q, wants %q", got, expects)
11 }
12}
13
14func TestFormatDebugBuild(t *testing.T) {
15 expects := "gh version 1.4.0 (2020-12-15) [debug build]\nhttps://github.com/cli/cli/releases/tag/v1.4.0\n"

Callers

nothing calls this directly

Calls 2

formatFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected