(t *testing.T)
| 92 | } |
| 93 | |
| 94 | func 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 | |
| 120 | func TestBuild_GlobalFlagsEmittedTopLevelOnly(t *testing.T) { |
| 121 | root := buildSyntheticTree() |
nothing calls this directly
no test coverage detected