Adjusted starting speech rate for new users. Fixed error that could happen when figuring out where to write changes.
This commit is contained in:
1 parent
f989628a5a
commit
3b7a44c224
19 files changed
+163
-49
No files matched your search
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user