22 lines
329 B
Go
22 lines
329 B
Go
package commons
|
|
|
|
import (
|
|
"testing"
|
|
"slices"
|
|
)
|
|
|
|
func TestFileDeepScan(t *testing.T) {
|
|
files := make([]string, 0)
|
|
|
|
FileDeepScan(".file", &files)
|
|
|
|
l := len(files)
|
|
|
|
if l != 2 {
|
|
t.Fatalf("Should have found %d files", l)
|
|
}
|
|
|
|
if !slices.Contains(files, ".file/dir1/file1.json") {
|
|
t.Fatal("Should have found file1.json")
|
|
}
|
|
} |