mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-18 03:24:00 +00:00
os.Remove: avoid double-wrapping err; fixes TODO in test
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ func Remove(path string) error {
|
|||||||
}
|
}
|
||||||
err := fs.Remove(suffix)
|
err := fs.Remove(suffix)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &PathError{"remove", path, err}
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,9 +63,8 @@ func TestRemove(t *testing.T) {
|
|||||||
t.Errorf("TestRemove: PathError returned path %q, expected %q", pe.Path, f)
|
t.Errorf("TestRemove: PathError returned path %q, expected %q", pe.Path, f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: make this pass.
|
|
||||||
if !IsNotExist(err) {
|
if !IsNotExist(err) {
|
||||||
t.Logf("TestRemove: TODO: expected IsNotExist(err) true, got false; err %q", err.Error())
|
t.Errorf("TestRemove: expected IsNotExist(err) true, got false; err %q", err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user