diff --git a/parser/parser_test.go b/parser/parser_test.go index dfb95f11..066dbf11 100644 --- a/parser/parser_test.go +++ b/parser/parser_test.go @@ -28,6 +28,7 @@ LICENSE package parser import ( + "fmt" "io/ioutil" "log" "os" @@ -68,9 +69,10 @@ func TestH264Parser(t *testing.T) { select { case parser.InputChan() <- data[i]: case frame := <-parser.OutputChan(): - out, err := os.Create("testOutput/" + strconv.Itoa(n) + ".h264_frame") + path := fmt.Sprintf("testOutput/" + strconv.Itoa(n) + "h264_frame") + out, err := os.Create(path) if err != nil { - t.Errorf("Should not have got error creating output file!") + t.Errorf("Unexpected error creating %q: %v", path, err) return } out.Write(frame)