Added more tests

This commit is contained in:
Eduard Urbach 2024-07-17 19:50:46 +02:00
parent 814364612f
commit 4806206500
Signed by: eduard
GPG key ID: 49226B848C78F6C8
5 changed files with 65 additions and 3 deletions

View file

@ -19,7 +19,12 @@ func TestWalk(t *testing.T) {
assert.Contains(t, files, "Walk_test.go")
}
func TestNonExisting(t *testing.T) {
func TestWalkFile(t *testing.T) {
err := fs.Walk("Walk.go", func(file string) {})
assert.NotNil(t, err)
}
func TestWalkNonExisting(t *testing.T) {
err := fs.Walk("does-not-exist", func(file string) {})
assert.NotNil(t, err)
}