X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/d73a88b9e0835b1d7f0711e02db56555101a7830..f5c601f1801aaa276f8c335fcb51c373edc0b50c:/voice_transcriber_test.go diff --git a/voice_transcriber_test.go b/voice_transcriber_test.go index 48732f7..c9e24bc 100644 --- a/voice_transcriber_test.go +++ b/voice_transcriber_test.go @@ -57,9 +57,18 @@ func TestVoiceFailuresKeepStoredAudioAndSafeMarkers(t *testing.T) { 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) { @@ -144,7 +153,10 @@ func TestVoiceConfigReadsExplicitLocalPaths(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) { @@ -178,8 +190,11 @@ 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, }, {