Use properly joined file paths.

master
Icedream 2018-07-09 12:35:18 +02:00
parent f9c5b5e0c6
commit 4dc3a544f7
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
2 changed files with 5 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import (
"io"
"io/ioutil"
"os"
"path/filepath"
"sync"
"testing"
@ -13,7 +14,7 @@ import (
func Test_Demux(t *testing.T) {
Convey("Demuxer", t, func() {
Convey("audio-only", func() {
reader, _ := os.Open("testassets/mpthreetest.mp3")
reader, _ := os.Open(filepath.Join("testassets", "mpthreetest.mp3"))
defer reader.Close()
demuxer := Demux(reader)
@ -43,7 +44,7 @@ func Test_Demux(t *testing.T) {
})
Convey("video and audio", func() {
reader, _ := os.Open("testassets/small.ogv")
reader, _ := os.Open(filepath.Join("testassets", "small.ogv"))
defer reader.Close()
demuxer := Demux(reader)

View File

@ -4,6 +4,7 @@ import (
"io"
"io/ioutil"
"os"
"path/filepath"
"testing"
. "github.com/smartystreets/goconvey/convey"
@ -12,7 +13,7 @@ import (
func Test_Muxer(t *testing.T) {
Convey("Muxer", t, func() {
Convey("audio-only", func() {
reader, _ := os.Open("testassets/mpthreetest.mp3")
reader, _ := os.Open(filepath.Join("testassets", "mpthreetest.mp3"))
defer reader.Close()
demuxer := Demux(reader)