Test that New names a nil module beside the missing seed, and that the CLI without --seed draws from the seed Main gives run

This commit is contained in:
2026-10-12 18:17:45 +02:00
committed by Lillem4n
parent 9c8a0449ca
commit 7c0fa4075f
2 changed files with 20 additions and 14 deletions
+3
View File
@@ -77,6 +77,9 @@ func TestNewWithoutASeedFailsNamingWithSeed(t *testing.T) {
t.Errorf("New(%s) = %v, want it refused, naming WithSeed", name, err)
}
}
if _, err := New(WithDataFS(nil)); err == nil || !strings.Contains(err.Error(), "WithSeed(") || !strings.Contains(err.Error(), "module 1 is nil") {
t.Errorf("New(WithDataFS(nil)) = %v, want both the missing seed and the nil module named", err)
}
}
func TestWithSeedIsDeterministic(t *testing.T) {