Open tone-test output before transmission
This commit is contained in:
1 parent
d64e5125dd
commit
e564bb8583
3 files changed
+22
-7
No files matched your search
@@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// Regression: tone transmission was started before opening its output file,
|
||||
// so a creation error left audio transmission running without cleanup.
|
||||
func TestNewAudioFileSaverReportsUnavailableOutputPath(t *testing.T) {
|
||||
path := filepath.Join(t.TempDir(), "missing", "tone.pcm")
|
||||
if saver, err := NewAudioFileSaver(path); err == nil || saver != nil {
|
||||
t.Fatalf("got saver=%v err=%v", saver, err)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user