diff options
Diffstat (limited to 'internal/repl/help_test.go')
| -rw-r--r-- | internal/repl/help_test.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/internal/repl/help_test.go b/internal/repl/help_test.go index ca77462..9813ebb 100644 --- a/internal/repl/help_test.go +++ b/internal/repl/help_test.go @@ -134,8 +134,8 @@ func TestGetCompletionTopicsIncludesAliases(t *testing.T) { expectedAliases := []string{"exit", "calc", "gt", "lt", "categories"} for _, expected := range expectedAliases { found := false - for _, t := range topics { - if t == expected { + for _, topic := range topics { + if topic == expected { found = true break } @@ -144,6 +144,13 @@ func TestGetCompletionTopicsIncludesAliases(t *testing.T) { t.Errorf("GetCompletionTopics() missing alias/topic %q", expected) } } + + // "help" itself should NOT be in completion topics + for _, topic := range topics { + if topic == "help" { + t.Error("GetCompletionTopics() should not include 'help' itself") + } + } } func TestGetCompletionTopicsIsSorted(t *testing.T) { |
