claude_profile 1.2.0

Claude Code account credential management and token status
Documentation
# Test: `count::` Parameter

Edge case coverage for the `count::` parameter on `.usage`. See [param/037_count.md](../../../../docs/cli/param/037_count.md) for specification.

### Test Case Index

| ID | Test Name | Category |
|----|-----------|----------|
| EC-1 | `count::3` with 5 accounts shows at most 3 rows | Behavioral Divergence |
| EC-2 | `count::0` (default) shows all rows | Behavioral Divergence |
| EC-3 | `count::100` with 2 accounts shows all 2 rows | Over-count |
| EC-4 | `count::abc` exits 1 with type error | Invalid Value |
| EC-5 | `count::1 sort::name` shows exactly first row | Extreme Limit |
| EC-6 | `count::-1` exits 1 (negative integer rejected) | Invalid Value |

---

### EC-1: `count::3` shows at most 3 rows

- **Given:** Five or more accounts.
- **When:** `clp .usage count::3`
- **Then:** Exits 0. Table body has at most 3 data rows. Header and footer shown.
- **Exit:** 0
- **Source fn:** `it178_count_3_shows_first_3_rows` (in `tests/cli/usage_test.rs`)
- **Source:** [param/037_count.md]../../../../docs/cli/param/037_count.md

---

### EC-2: `count::0` shows all rows

- **Given:** Three accounts.
- **When:** `clp .usage count::0`
- **Then:** Exits 0. All 3 rows shown (count::0 = no limit).
- **Exit:** 0
- **Source fn:** `it179_count_0_shows_all_rows` (in `tests/cli/usage_test.rs`)
- **Source:** [param/037_count.md]../../../../docs/cli/param/037_count.md

---

### EC-3: `count::100` with 2 accounts shows both rows

- **Given:** Two accounts.
- **When:** `clp .usage count::100`
- **Then:** Exits 0. Both rows shown (count exceeds available rows).
- **Exit:** 0
- **Source fn:** `it180_count_100_exceeding_shows_all` (in `tests/cli/usage_test.rs`)
- **Source:** [param/037_count.md]../../../../docs/cli/param/037_count.md

---

### EC-4: `count::abc` exits 1 with type error

- **Given:** Any environment.
- **When:** `clp .usage count::abc`
- **Then:** Exits 1. Stderr contains a type error message (expected non-negative integer).
- **Exit:** 1
- **Source fn:** `it181_count_abc_exits_1` (in `tests/cli/usage_test.rs`)
- **Source:** [param/037_count.md]../../../../docs/cli/param/037_count.md

---

### EC-5: `count::1 sort::name` shows exactly first row

- **Given:** Three accounts with deterministic name sort.
- **When:** `clp .usage count::1 sort::name`
- **Then:** Exits 0. Exactly 1 row in the table body — the alphabetically first account. Remaining 2 accounts not shown.
- **Exit:** 0
- **Source fn:** `it182_count_1_sort_name_shows_only_first` (in `tests/cli/usage_test.rs`)
- **Source:** [param/037_count.md]../../../../docs/cli/param/037_count.md

---

### EC-6: `count::-1` exits 1 (negative value rejected)

- **Given:** Any environment.
- **When:** `clp .usage count::-1`
- **Then:** Exits 1. Stderr indicates value must be a non-negative integer.
- **Exit:** 1
- **Source fn:** `it183_count_minus_1_exits_1` (in `tests/cli/usage_test.rs`)
- **Source:** [param/037_count.md]../../../../docs/cli/param/037_count.md