Lines Matching refs:test
96 for _, test := range testCases {
97 t.Run(test.from, func(t *testing.T) {
98 got := mock.followSymlinks(test.from)
99 if got != test.to {
100 t.Errorf("want: %v, got %v", test.to, got)
190 for _, test := range testCases {
191 t.Run(test.name, func(t *testing.T) {
192 got, err := fs.IsDir(filepath.Join(dir, test.name))
193 checkErr(t, test.err, err)
194 if got != test.isDir {
195 t.Errorf("want: %v, got %v", test.isDir, got)
232 for _, test := range testCases {
233 t.Run(test.name, func(t *testing.T) {
234 got, err := fs.ListDirsRecursive(filepath.Join(dir, test.name), FollowSymlinks)
235 checkErr(t, test.err, err)
236 want := append([]string(nil), test.dirs...)
278 for _, test := range testCases {
279 t.Run(test.name, func(t *testing.T) {
280 got, err := fs.ListDirsRecursive(filepath.Join(dir, test.name), DontFollowSymlinks)
281 checkErr(t, test.err, err)
282 want := append([]string(nil), test.dirs...)
341 for _, test := range testCases {
342 t.Run(test.from, func(t *testing.T) {
343 got, err := fs.Readlink(test.from)
344 checkErr(t, test.err, err)
345 if got != test.to {
346 t.Errorf("fs.Readlink(%q) want: %q, got %q", test.from, test.to, got)
402 for _, test := range testCases {
403 t.Run(test.name, func(t *testing.T) {
404 got, err := fs.Lstat(filepath.Join(dir, test.name))
405 checkErr(t, test.err, err)
409 if got.Mode()&os.ModeType != test.mode {
411 test.name, test.mode, got.Mode()&os.ModeType)
413 if test.mode == 0 && got.Size() != test.size {
414 t.Errorf("fs.Lstat(%q).Size() want: %d, got %d", test.name, test.size, got.Size())
470 for _, test := range testCases {
471 t.Run(test.name, func(t *testing.T) {
472 got, err := fs.Stat(filepath.Join(dir, test.name))
473 checkErr(t, test.err, err)
477 if got.Mode()&os.ModeType != test.mode {
479 test.name, test.mode, got.Mode()&os.ModeType)
481 if test.mode == 0 && got.Size() != test.size {
482 t.Errorf("fs.Stat(%q).Size() want: %d, got %d", test.name, test.size, got.Size())
528 for _, test := range testCases {
529 t.Run(test.pattern, func(t *testing.T) {
530 got, err := fs.glob(test.pattern)
534 if !reflect.DeepEqual(got, test.files) {
535 t.Errorf("want: %v, got %v", test.files, got)