Adjusted starting speech rate for new users. Fixed error that could happen when figuring out where to write changes.

This commit is contained in:
Storm Dragon committed 2026-10-28 15:04:41 -04:00
1 parent f989628a5a
commit 3b7a44c224
19 files changed
+163 -49

No files matched your search

+2 -2
View File
@@ -79,7 +79,7 @@ func TestSettingsSelectionDoesNotHideInvalidOrExplicitMissingFiles(t *testing.T)
t.Fatal(err)
}
settings, selected, err = Load("", []string{userPath, systemPath})
if err != nil || selected != userPath || settings.Presentation.Sound.Enabled || settings.Presentation.Speech.Rate != 80 {
if err != nil || selected != userPath || settings.Presentation.Sound.Enabled || settings.Presentation.Speech.Rate != -20 {
t.Fatalf("user selection merged system values: %+v %s %v", settings, selected, err)
}
if err := os.WriteFile(userPath, []byte("invalid = true"), 0600); err != nil {
@@ -151,7 +151,7 @@ func TestShippedExampleMatchesDefaults(t *testing.T) {
func TestSpeechParameterDefaultsAndBounds(t *testing.T) {
for _, data := range []string{"version=1\n", "version=2\n", "version=3\n"} {
settings, err := Decode([]byte(data))
if err != nil || settings.Presentation.Speech.Pitch != 0 || settings.Presentation.Speech.Volume != 100 {
if err != nil || settings.Presentation.Speech.Rate != -20 || settings.Presentation.Speech.Pitch != 0 || settings.Presentation.Speech.Volume != 100 {
t.Fatal(settings, err)
}
}