MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / TestBuild_TopLevelEnvelope

Function TestBuild_TopLevelEnvelope

internal/cmdhelp/json_test.go:94–118  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

92}
93
94func TestBuild_TopLevelEnvelope(t *testing.T) {
95 root := buildSyntheticTree()
96 doc := Build(root, root, Options{
97 Binary: "padtest",
98 Version: "9.9.9",
99 Homepage: "https://example.test",
100 MaxDepth: -1,
101 })
102
103 if doc.CmdhelpVersion != "0.1" {
104 t.Errorf("cmdhelp_version = %q, want 0.1", doc.CmdhelpVersion)
105 }
106 if doc.Binary != "padtest" {
107 t.Errorf("binary = %q, want padtest", doc.Binary)
108 }
109 if doc.Version != "9.9.9" {
110 t.Errorf("version = %q, want 9.9.9", doc.Version)
111 }
112 if doc.Homepage != "https://example.test" {
113 t.Errorf("homepage = %q, want https://example.test", doc.Homepage)
114 }
115 if doc.Summary != "Test root" {
116 t.Errorf("summary = %q, want Test root", doc.Summary)
117 }
118}
119
120func TestBuild_GlobalFlagsEmittedTopLevelOnly(t *testing.T) {
121 root := buildSyntheticTree()

Callers

nothing calls this directly

Calls 2

buildSyntheticTreeFunction · 0.85
BuildFunction · 0.85

Tested by

no test coverage detected