hasCwdCheatpath checks whether the --directories output contains a cheatpath named "cwd". The output format is "name: path\n" per line (tabwriter-aligned), so we look for a line beginning with "cwd".
(output string)
| 14 | // cheatpath named "cwd". The output format is "name: path\n" per line |
| 15 | // (tabwriter-aligned), so we look for a line beginning with "cwd". |
| 16 | func hasCwdCheatpath(output string) bool { |
| 17 | for _, line := range strings.Split(output, "\n") { |
| 18 | if strings.HasPrefix(line, "cwd") { |
| 19 | return true |
| 20 | } |
| 21 | } |
| 22 | return false |
| 23 | } |
| 24 | |
| 25 | // TestLocalCheatpathIntegration exercises the recursive .cheat directory |
| 26 | // discovery end-to-end: it builds the real cheat binary, sets up filesystem |
no outgoing calls
no test coverage detected