Manlio Perillo
Manlio Perillo
@windows-h8r Thanks. @Vexu Ping.
@ericlagergren, thanks. Using `t.Cleanup` is much better.
By the way, in https://github.com/golang/go/blob/master/src/go/build/build_test.go#L543 there is a similar pattern when changing an environment variable ```go defer os.Setenv("GO111MODULE", os.Getenv("GO111MODULE")) os.Setenv("GO111MODULE", "off") ``` I have also noted that that many tests...
Ok, thanks. Probably moving to `T.TempDir` is better, since currently the name passed to `os.MkdirTemp` is not consistent; it is either: - empty - `t.Name` - the test name but...
I have noted that a similar pattern is also used in https://github.com/golang/go/blob/master/src/syscall/syscall_linux_test.go#L27, where a `chtmpdir` is defined, and in https://github.com/golang/go/blob/master/src/runtime/syscall_windows_test.go#L945. Maybe the support `chdir` function should be defined in a...
In `path_test.go` are defined both the new `chdir` function and the old chtmpdir that returns a function to use in a defer statement. Probably the old function should be removed...
For reference, here is a list with all tests using the `os.Chdir` function: ## std ``` internal/execabs/execabs_test.go io/fs/walk_test.go os/error_test.go os/exec/lp_unix_test.go os/executable_test.go os/os_windows_test.go path/filepath/example_unix_walk_test.go path/filepath/match_test.go path/filepath/path_test.go path/filepath/path_windows_test.go runtime/syscall_windows_test.go syscall/syscall_linux_test.go ``` ##...
As I have suggested in https://golang.org/cl/307651, the `chtmpdir` should be moved to a shared package, as an example `internal/ostest`, since it will probably be used by about 10 packages. A...
I think this issue can be closed after commit d0eef26.
@ssmid I tried with `0.12.0-dev.2341+92211135` and it seems it work correctly: ```console test.zig:12:30: error: expected type 'i64', found 'u64' ret_value = @as(i64, value2); ^~~~~~ test.zig:12:30: note: signed 64-bit int cannot...