name string
script string
}{
- {name: "failed process does not expose its errors", script: "echo secret-speech >&2; exit 1"},
- {name: "missing transcript gets a marker", script: "exit 0"},
- {name: "empty transcript gets a marker", script: "while [ \"$1\" != --output-file ]; do shift; done; shift; touch \"$1.txt\""},
+ {
+ name: "failed process does not expose its errors",
+ script: "echo secret-speech >&2; exit 1",
+ },
+ {
+ name: "missing transcript gets a marker",
+ script: "exit 0",
+ },
+ {
+ name: "empty transcript gets a marker",
+ script: "while [ \"$1\" != --output-file ]; do shift; done; shift; touch \"$1.txt\"",
+ },
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
config, err := loadConfig(dir)
require.NoError(t, err)
- require.Equal(t, VoiceConfig{Transcriber: "local-whisper", Model: "model.bin"}, config.Voice)
+ require.Equal(t, VoiceConfig{
+ Transcriber: "local-whisper",
+ Model: "model.bin",
+ }, config.Voice)
}
func TestVoiceLookupHonorsExplicitThenNixThenPath(t *testing.T) {
available: true,
},
{
- name: "invalid explicit executable does not fall back",
- config: VoiceConfig{Transcriber: "missing", Model: valid.Model},
+ name: "invalid explicit executable does not fall back",
+ config: VoiceConfig{
+ Transcriber: "missing",
+ Model: valid.Model,
+ },
program: valid.Transcriber,
},
{