(step verify.StepResult, r *lipgloss.Renderer)
| 161 | } |
| 162 | |
| 163 | func printVerifyStep(step verify.StepResult, r *lipgloss.Renderer) { |
| 164 | statusStr := formatVerifyStatus(step.Status, r) |
| 165 | switch step.Type { |
| 166 | case "bash": |
| 167 | fmt.Printf(" %s %s\n", statusStr, step.Command) |
| 168 | if step.Dir != "" { |
| 169 | fmt.Printf(" dir: %s\n", formatDim(step.Dir, r)) |
| 170 | } |
| 171 | if step.Status == verify.StatusFail { |
| 172 | printFailureOutput(step, r) |
| 173 | } |
| 174 | case "assert": |
| 175 | fmt.Printf(" %s %s\n", statusStr, step.Check) |
| 176 | default: |
| 177 | label := step.Type |
| 178 | if step.Warning != "" { |
| 179 | label = step.Warning |
| 180 | } |
| 181 | fmt.Printf(" %s %s\n", statusStr, label) |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | func printFailureOutput(step verify.StepResult, r *lipgloss.Renderer) { |
| 186 | printDimLines := func(s string) { |
no test coverage detected