@cryptotaxi247 / kubo / commits / b68e37f4c

Resolve symlinks of testfiles

License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

Jakub Sztandera committed Jul 1, 2016 at 09:48 UTC b68e37f4c39b1abadac59ddc62062a40e8649213
1 file changed +10
commands/cli/parse_test.go
+10
@@ -4,6 +4,7 @@ import (
4 "io"
5 "io/ioutil"
6 "os"
7 + "path/filepath"
8 "runtime"
9 "strings"
10 "testing"
@@ -287,6 +288,15 @@ func TestArgumentParsing(t *testing.T) {
288 if err != nil {
289 t.Fatal(err)
290 }
291 + fn, err := filepath.EvalSymlinks(f.Name())
292 + if err != nil {
293 + t.Fatal(err)
294 + }
295 + f.Close()
296 + f, err = os.Create(fn)
297 + if err != nil {
298 + t.Fatal(err)
299 + }
300
301 return f
302 }