Require talk key for tone test transmission

This commit is contained in:
Brandon McGinty (chatgpt)
2026-08-09 22:31:37 -04:00
committed by Brandon McGinty
parent 612db896ce
commit 1ea71b1862
2 changed files with 22 additions and 8 deletions
+11
View File
@@ -7,6 +7,17 @@ import (
// Regression: tone transmission was started before opening its output file,
// so a creation error left audio transmission running without cleanup.
// Regression: tone test transmitted immediately, preventing the configured
// talk key from controlling it.
func TestToneTestRequiresAutoTransmit(t *testing.T) {
if (&Barnard{ToneTest: true}).toneTestAutoTransmit() {
t.Fatal("tone test started without auto-transmit")
}
if !(&Barnard{ToneTest: true, AutoTransmit: true}).toneTestAutoTransmit() {
t.Fatal("tone test did not auto-transmit")
}
}
func TestNewAudioFileSaverReportsUnavailableOutputPath(t *testing.T) {
path := filepath.Join(t.TempDir(), "missing", "tone.pcm")
if saver, err := NewAudioFileSaver(path); err == nil || saver != nil {