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

View File

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