mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-05 03:17:50 +08:00
eval symlink of ioutil.TempDir
This commit is contained in:
parent
e0212a7353
commit
154517ceb0
|
@ -3,6 +3,7 @@ package util
|
|||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
@ -12,7 +13,8 @@ func TestGetwd(t *testing.T) {
|
|||
t.Errorf("Got error when creating temp dir: %v", error)
|
||||
} else {
|
||||
os.Chdir(dir)
|
||||
if gotwd := Getwd(); gotwd != dir {
|
||||
dir, error = filepath.EvalSymlinks(dir)
|
||||
if gotwd := Getwd(); gotwd != dir || error != nil {
|
||||
t.Errorf("Getwd() -> %v, want %v", gotwd, dir)
|
||||
}
|
||||
os.Remove(dir)
|
||||
|
|
Loading…
Reference in New Issue
Block a user