mirror of
https://github.com/cheat/cheat.git
synced 2026-03-07 11:13:33 +01:00
Replace docopt-go with spf13/cobra, giving cheat a built-in `--completion` flag that dynamically generates shell completions for bash, zsh, fish, and powershell. This replaces the manually-maintained static completion scripts and resolves the root cause of multiple completion issues (#768, #705, #633, #632, #476). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
21 lines
340 B
Go
21 lines
340 B
Go
package config
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
// TestColor asserts that colorization rules are properly respected
|
|
func TestColor(t *testing.T) {
|
|
|
|
// mock a config
|
|
conf := Config{}
|
|
|
|
if conf.Color(false) {
|
|
t.Errorf("failed to respect forceColorize (false)")
|
|
}
|
|
|
|
if !conf.Color(true) {
|
|
t.Errorf("failed to respect forceColorize (true)")
|
|
}
|
|
}
|