1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-29 01:12:24 +08:00

Merge pull request #2926 from ipfs/feature/fix-test-parse-symlink-#2925

Resolve symlinks of testfiles
This commit is contained in:
Jeromy Johnson
2016-07-01 09:44:01 -07:00
committed by GitHub

View File

@ -4,6 +4,7 @@ import (
"io"
"io/ioutil"
"os"
"path/filepath"
"runtime"
"strings"
"testing"
@ -287,6 +288,15 @@ func TestArgumentParsing(t *testing.T) {
if err != nil {
t.Fatal(err)
}
fn, err := filepath.EvalSymlinks(f.Name())
if err != nil {
t.Fatal(err)
}
f.Close()
f, err = os.Create(fn)
if err != nil {
t.Fatal(err)
}
return f
}