@@ -10,21 +10,32 @@ import (
10
10
)
11
11
12
12
func 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 .+`
14
14
}
15
15
16
16
func 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 .+`
18
18
}
19
19
20
20
func 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 .+`
22
22
}
23
23
24
24
func 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 .+`
26
26
}
27
27
28
28
func Test_osSetenv (t * testing.T ) {
29
29
os .Setenv ("" , "" )
30
30
}
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