Tests for the real data-path error, an empty data path, and a crypto/rand failure
Tests / vet + fmt + tests (pull_request) Failing after 16s

This commit is contained in:
2026-09-02 19:09:19 +02:00
parent 4f9285ab5c
commit ae0527a26e
3 changed files with 36 additions and 3 deletions
+7
View File
@@ -355,3 +355,10 @@ func TestRunUnknownFlagIsNamedByRune(t *testing.T) {
t.Errorf("run(-ä) = %d, %q, want the flag named whole", code, errb)
}
}
func TestRunEmptyDataPathIsNamed(t *testing.T) {
code, _, errb := runOut("--data-path=", "sv_SE.word")
if code != 1 || !strings.Contains(errb, "empty") {
t.Errorf("run(--data-path=) = %d, %q, want the empty path named", code, errb)
}
}