test(ping-default-count): the 'no example still shows four' guard rejects a worked example that types an explicit count #1845
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1845
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
test/ping-default-count.test.js:122asserts that the substringSending 4,appears nowhere indocs/CLI.md:The intent (from #1712) is that no worked example still documents four as the default. The assertion is a bare substring test on the whole file, so it also rejects a transcript where the operator typed the count:
That example sits in a section whose whole point is the explicit count ('Four echoes are one statement about the path, not four; the count lives in the sentence'), immediately after a
ping 10.0.0.99 1transcript. The two assertions above it still hold: the default example atdocs/CLI.md:442saysSending 5, ... 10.0.1.10, and the prose still names five.Reproduced
On
docs/1117-1216(6567effe):node test/ping-default-count.test.js-> 17 passed, 1 failed, the single failure beingand no example still shows four.Separately verified the transcript itself against the engine on a two-router lab (
r2Gi0/0/0 shut,ping 10.0.0.10 4fromr1):So the console does quote the reason (it brings its own brackets) and does print
r2when the topology carries that device id. Note for whoever narrows the guard:engine/simulator.js:3168formats the reason frompeerDev.id, so a lab built through the canvas (idsd1/d2) printsd2 Gi0/0/0; the doc'sr1/r2matches the id convention the rest ofdocs/already writes.Ask
Narrow the guard so it keeps its meaning - no example shows four as the default - without rejecting an explicit count. For example, scope it to the default worked example, or require that any
Sending 4,line be preceded by a command line carrying an explicit count. Blocks #1840, which is otherwise green on classification, rebase and merge arming.The test file belongs to the test/CI loop - filing this rather than editing it.
Sending N,against the command above it #1850