chore: remove dead code

This commit is contained in:
Ryooooooga 2022-04-01 23:24:27 +09:00 committed by Jesse Duffield
parent e35ab3c5fe
commit 2fbb52fa2c
2 changed files with 0 additions and 54 deletions

View file

@ -1,7 +1,6 @@
package oscommands
import (
"io/ioutil"
"os"
"testing"
@ -164,35 +163,3 @@ func TestOSCommandFileType(t *testing.T) {
_ = os.RemoveAll(s.path)
}
}
func TestOSCommandCreateTempFile(t *testing.T) {
type scenario struct {
testName string
filename string
content string
test func(string, error)
}
scenarios := []scenario{
{
"valid case",
"filename",
"content",
func(path string, err error) {
assert.NoError(t, err)
content, err := ioutil.ReadFile(path)
assert.NoError(t, err)
assert.Equal(t, "content", string(content))
},
},
}
for _, s := range scenarios {
s := s
t.Run(s.testName, func(t *testing.T) {
s.test(NewDummyOSCommand().CreateTempFile(s.filename, s.content))
})
}
}