Repository navigation
Commit e635309
committed
test(cli): make single-word-arg quoting test hermetic
TestQuoteExecArgs_SingleWordArgsUnaffected exec'd a real `redis-cli PING`
and keyed off "not found" in the error to decide pass/fail. That made it
environment-dependent: on a machine where redis-cli is installed but no
Redis is running, the binary runs and exits non-zero with "Connection
refused" (no "not found"), failing the test for a reason unrelated to
argument quoting. Rewrite it against the controlled argv-dumper — the
same fixture the sibling multi-word test uses — and assert the arg
survives verbatim (ARG<PING>, no split/merge/quote leakage). Now
deterministic regardless of what's installed or running.1 parent 8cfc05c commit e635309
1 file changed
Lines changed: 24 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
45 | 55 | | |
46 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
47 | 59 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 60 | | |
53 | | - | |
54 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
55 | 69 | | |
56 | | - | |
57 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
58 | 73 | | |
59 | 74 | | |
60 | 75 | | |
| |||
0 commit comments