Tests for every branch of the constant-divisor fold, arg errors naming the spelling, and shell numbers at the CLI
Tests / vet + fmt + tests (pull_request) Failing after 43s

This commit is contained in:
2026-09-02 19:24:46 +02:00
parent c5304bb6e7
commit a9552ed966
3 changed files with 35 additions and 3 deletions
+8
View File
@@ -362,3 +362,11 @@ func TestRunEmptyDataPathIsNamed(t *testing.T) {
t.Errorf("run(--data-path=) = %d, %q, want the empty path named", code, errb)
}
}
func TestRunNumbersFollowTheShell(t *testing.T) {
_, want, _ := runOut("--seed", "7", "--repeat", "3", "sv_SE.word")
code, got, errb := runOut("--seed", "007", "--repeat", "+3", "sv_SE.word")
if code != 0 || got != want {
t.Errorf("run(--seed 007 --repeat +3) = %d, %q, stderr %q; want the same as --seed 7 --repeat 3 %q", code, got, errb, want)
}
}