@@ -10,21 +10,32 @@ import (
1010)
1111
1212func Test_contextBackground (t * testing.T ) {
13- context .Background () // want `context\.Background\(\) could be replaced by <t/b/tb> \.Context\(\) in .+`
13+ context .Background () // want `context\.Background\(\) could be replaced by t \.Context\(\) in .+`
1414}
1515
1616func Test_contextTODO (t * testing.T ) {
17- context .TODO () // want `context\.TODO\(\) could be replaced by <t/b/tb> \.Context\(\) in .+`
17+ context .TODO () // want `context\.TODO\(\) could be replaced by t \.Context\(\) in .+`
1818}
1919
2020func Test_osChdir (t * testing.T ) {
21- os .Chdir ("" ) // want `os\.Chdir\(\) could be replaced by <t/b/tb> \.Chdir\(\) in .+`
21+ os .Chdir ("" ) // want `os\.Chdir\(\) could be replaced by t \.Chdir\(\) in .+`
2222}
2323
2424func Test_osMkdirTemp (t * testing.T ) {
25- os .MkdirTemp ("" , "" ) // want `os\.MkdirTemp\(\) could be replaced by <t/b/tb> \.TempDir\(\) in .+`
25+ os .MkdirTemp ("" , "" ) // want `os\.MkdirTemp\(\) could be replaced by t \.TempDir\(\) in .+`
2626}
2727
2828func Test_osSetenv (t * testing.T ) {
2929 os .Setenv ("" , "" )
3030}
31+
32+ func Test_osTempDir (t * testing.T ) {
33+ os .TempDir ()
34+ }
35+
36+ func Test_osCreateTemp (t * testing.T ) {
37+ os .CreateTemp ("" , "" ) // want `os\.CreateTemp\("", \.\.\.\) could be replaced by os\.CreateTemp\(t\.TempDir\(\), \.\.\.\) in .+`
38+ os .CreateTemp ("" , "xx" ) // want `os\.CreateTemp\("", \.\.\.\) could be replaced by os\.CreateTemp\(t\.TempDir\(\), \.\.\.\) in .+`
39+ os .CreateTemp (os .TempDir (), "xx" )
40+ os .CreateTemp (t .TempDir (), "xx" )
41+ }
0 commit comments