mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 02:33:28 +00:00
os: pull in os.Rename and some of its tests from upstream
Skip part of the test on Windows because of https://github.com/tinygo-org/tinygo/issues/2480 TODO: fix 2480 and unskip test TODO: pull in rest of upstream tests, fix problems they find Requested in https://github.com/tinygo-org/tinygo/issues/2109
This commit is contained in:
@@ -18,6 +18,15 @@ func fixLongPath(path string) string {
|
||||
return path
|
||||
}
|
||||
|
||||
func rename(oldname, newname string) error {
|
||||
// TODO: import rest of upstream tests, handle fancy cases
|
||||
err := syscall.Rename(oldname, newname)
|
||||
if err != nil {
|
||||
return &LinkError{"rename", oldname, newname, err}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func Pipe() (r *File, w *File, err error) {
|
||||
var p [2]int
|
||||
err = handleSyscallError(syscall.Pipe2(p[:], syscall.O_CLOEXEC))
|
||||
|
||||
Reference in New Issue
Block a user